From 48717b422aabb778d9cbe40a6dd87e9bf8fd99bf Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Thu, 2 Sep 2021 15:20:07 -0700 Subject: [PATCH 01/48] feat: initial files --- .../CODE_OF_CONDUCT.md | 94 ++++++++ .../CONTRIBUTING.md | 76 +++++++ .../LICENSE | 202 ++++++++++++++++++ .../README.md | 126 +++++++++++ 4 files changed, 498 insertions(+) create mode 100644 packages/google-cloud-orchestration-airflow-service/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-orchestration-airflow-service/CONTRIBUTING.md create mode 100644 packages/google-cloud-orchestration-airflow-service/LICENSE create mode 100644 packages/google-cloud-orchestration-airflow-service/README.md diff --git a/packages/google-cloud-orchestration-airflow-service/CODE_OF_CONDUCT.md b/packages/google-cloud-orchestration-airflow-service/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/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-orchestration-airflow-service/CONTRIBUTING.md b/packages/google-cloud-orchestration-airflow-service/CONTRIBUTING.md new file mode 100644 index 00000000000..0d98693afb7 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Composer 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=composer.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-orchestration-airflow-service/LICENSE b/packages/google-cloud-orchestration-airflow-service/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/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-orchestration-airflow-service/README.md b/packages/google-cloud-orchestration-airflow-service/README.md new file mode 100644 index 00000000000..52b4005fc24 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/README.md @@ -0,0 +1,126 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Cloud Composer: Node.js Client](https://github.com/googleapis/nodejs-orchestration-airflow) + +[![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/orchestration-airflow.svg)](https://www.npmjs.org/package/@google-cloud/orchestration-airflow) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-orchestration-airflow/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-orchestration-airflow) + + + + +orchestration-airflow client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-orchestration-airflow/blob/master/CHANGELOG.md). + +* [Cloud Composer Node.js Client API Reference][client-docs] +* [Cloud Composer Documentation][product-docs] +* [github.com/googleapis/nodejs-orchestration-airflow](https://github.com/googleapis/nodejs-orchestration-airflow) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Composer 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/orchestration-airflow +``` + + + + + +The [Cloud Composer Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-orchestration-airflow/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-orchestration-airflow/blob/master/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/orchestration-airflow/latest +[product-docs]: https://cloud.google.com/composer/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=composer.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started From 671c5554d38c4c4bd881e8ddc1edba9741a4bcee Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Thu, 30 Sep 2021 12:56:40 -0700 Subject: [PATCH 02/48] feat!: initial release of orchestration-airflow (#2) --- .../.eslintignore | 6 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../.github/.OwlBot.yaml | 22 + .../.gitignore | 14 + .../.jsdoc.js | 55 + .../.mocharc.js | 29 + .../.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../.repo-metadata.json | 15 + .../README.md | 47 +- .../linkinator.config.json | 1 + .../package.json | 66 + .../airflow/service/v1/environments.proto | 730 + .../airflow/service/v1/image_versions.proto | 88 + .../airflow/service/v1/operations.proto | 88 + .../service/v1beta1/environments.proto | 971 + .../service/v1beta1/image_versions.proto | 88 + .../airflow/service/v1beta1/operations.proto | 84 + .../protos/protos.d.ts | 11509 ++++++ .../protos/protos.js | 28978 ++++++++++++++++ .../protos/protos.json | 3259 ++ .../samples/README.md | 50 + .../samples/package.json | 23 + .../samples/quickstart.js | 48 + .../samples/test/quickstart.js | 48 + .../src/index.ts | 30 + .../src/v1/environments_client.ts | 1286 + .../src/v1/environments_client_config.json | 46 + .../src/v1/environments_proto_list.json | 5 + .../src/v1/gapic_metadata.json | 105 + .../src/v1/image_versions_client.ts | 588 + .../src/v1/image_versions_client_config.json | 30 + .../src/v1/image_versions_proto_list.json | 5 + .../src/v1/index.ts | 20 + .../src/v1beta1/environments_client.ts | 1635 + .../v1beta1/environments_client_config.json | 54 + .../src/v1beta1/environments_proto_list.json | 5 + .../src/v1beta1/gapic_metadata.json | 125 + .../src/v1beta1/image_versions_client.ts | 588 + .../v1beta1/image_versions_client_config.json | 30 + .../v1beta1/image_versions_proto_list.json | 5 + .../src/v1beta1/index.ts | 20 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 41 + .../system-test/install.ts | 51 + .../test/gapic_environments_v1.ts | 1301 + .../test/gapic_environments_v1beta1.ts | 1687 + .../test/gapic_image_versions_v1.ts | 576 + .../test/gapic_image_versions_v1beta1.ts | 578 + .../tsconfig.json | 19 + .../webpack.config.js | 64 + 53 files changed, 55188 insertions(+), 6 deletions(-) create mode 100644 packages/google-cloud-orchestration-airflow-service/.eslintignore create mode 100644 packages/google-cloud-orchestration-airflow-service/.eslintrc.json create mode 100644 packages/google-cloud-orchestration-airflow-service/.gitattributes create mode 100644 packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-orchestration-airflow-service/.gitignore create mode 100644 packages/google-cloud-orchestration-airflow-service/.jsdoc.js create mode 100644 packages/google-cloud-orchestration-airflow-service/.mocharc.js create mode 100644 packages/google-cloud-orchestration-airflow-service/.nycrc create mode 100644 packages/google-cloud-orchestration-airflow-service/.prettierignore create mode 100644 packages/google-cloud-orchestration-airflow-service/.prettierrc.js create mode 100644 packages/google-cloud-orchestration-airflow-service/.repo-metadata.json create mode 100644 packages/google-cloud-orchestration-airflow-service/linkinator.config.json create mode 100644 packages/google-cloud-orchestration-airflow-service/package.json create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/operations.proto create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/protos.js create mode 100644 packages/google-cloud-orchestration-airflow-service/protos/protos.json create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/README.md create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/package.json create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/quickstart.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/test/quickstart.js create mode 100644 packages/google-cloud-orchestration-airflow-service/src/index.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1/environments_client_config.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1/environments_proto_list.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client_config.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_proto_list.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1/index.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client_config.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_proto_list.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1beta1/gapic_metadata.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client_config.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_proto_list.json create mode 100644 packages/google-cloud-orchestration-airflow-service/src/v1beta1/index.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/system-test/install.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts create mode 100644 packages/google-cloud-orchestration-airflow-service/tsconfig.json create mode 100644 packages/google-cloud-orchestration-airflow-service/webpack.config.js diff --git a/packages/google-cloud-orchestration-airflow-service/.eslintignore b/packages/google-cloud-orchestration-airflow-service/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-orchestration-airflow-service/.eslintrc.json b/packages/google-cloud-orchestration-airflow-service/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-orchestration-airflow-service/.gitattributes b/packages/google-cloud-orchestration-airflow-service/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.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-orchestration-airflow-service/.github/.OwlBot.yaml b/packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml new file mode 100644 index 00000000000..a617c09aee3 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/orchestration/airflow/service/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-orchestration-airflow-service/.gitignore b/packages/google-cloud-orchestration-airflow-service/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.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-orchestration-airflow-service/.jsdoc.js b/packages/google-cloud-orchestration-airflow-service/.jsdoc.js new file mode 100644 index 00000000000..96271aa8ffa --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 2021 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/orchestration-airflow', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-orchestration-airflow-service/.mocharc.js b/packages/google-cloud-orchestration-airflow-service/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.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-orchestration-airflow-service/.nycrc b/packages/google-cloud-orchestration-airflow-service/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.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-orchestration-airflow-service/.prettierignore b/packages/google-cloud-orchestration-airflow-service/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-orchestration-airflow-service/.prettierrc.js b/packages/google-cloud-orchestration-airflow-service/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.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-orchestration-airflow-service/.repo-metadata.json b/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json new file mode 100644 index 00000000000..20cb891ff55 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "orchestration-airflow", + "name_pretty": "Cloud Composer", + "api_description": "is a managed Apache Airflow service that helps you create, schedule, monitor and manage workflows. Cloud Composer automation helps you create Airflow environments quickly and use Airflow-native tools, such as the powerful Airflow web interface and command line tools, so you can focus on your workflows and not your infrastructure.", + "product_documentation": "https://cloud.google.com/composer/docs", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/orchestration-airflow/latest", + "api_id": "composer.googleapis.com", + "distribution_name": "@google-cloud/orchestration-airflow", + "release_level": "ga", + "default_version": "v1", + "language": "nodejs", + "repo": "googleapis/nodejs-orchestration-airflow", + "requires_billing": true, + "issue_tracker": "https://issuetracker.google.com/issues/new?component=460446" +} diff --git a/packages/google-cloud-orchestration-airflow-service/README.md b/packages/google-cloud-orchestration-airflow-service/README.md index 52b4005fc24..23354031079 100644 --- a/packages/google-cloud-orchestration-airflow-service/README.md +++ b/packages/google-cloud-orchestration-airflow-service/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/orchestration-airflow.svg)](https://www.npmjs.org/package/@google-cloud/orchestration-airflow) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-orchestration-airflow/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-orchestration-airflow) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-orchestration-airflow/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-orchestration-airflow) @@ -15,7 +15,7 @@ orchestration-airflow client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-orchestration-airflow/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-orchestration-airflow/blob/main/CHANGELOG.md). * [Cloud Composer Node.js Client API Reference][client-docs] * [Cloud Composer Documentation][product-docs] @@ -32,8 +32,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - - + * [Using the client library](#using-the-client-library) +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -55,6 +55,41 @@ npm install @google-cloud/orchestration-airflow ``` +### Using the client library + +```javascript +// Imports the Google Cloud client library + +// remove this line after package is released +// eslint-disable-next-line node/no-missing-require +const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow'); + +// 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 ImageVersionsClient(); + +async function listImageVersions() { + const [versions] = await client.listImageVersions({ + parent: `projects/${projectId}/locations/${location}`, + }); + console.info(versions); +} +listImageVersions(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-orchestration-airflow/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-orchestration-airflow/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-orchestration-airflow&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -103,7 +138,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-orchestration-airflow/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-orchestration-airflow/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 +150,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-orchestration-airflow/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-orchestration-airflow/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/orchestration-airflow/latest [product-docs]: https://cloud.google.com/composer/docs diff --git a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json new file mode 100644 index 00000000000..0947c2e0e5b --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json @@ -0,0 +1 @@ +{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json new file mode 100644 index 00000000000..c17d8e7f64e --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -0,0 +1,66 @@ +{ + "name": "@google-cloud/orchestration-airflow", + "version": "0.1.0", + "description": "orchestration-airflow client for Node.js", + "repository": "googleapis/nodejs-orchestration-airflow", + "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 orchestration-airflow", + "orchestration-airflow", + "orchestration-airflow 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.25.0" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.14.44", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v10.0.0" + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto new file mode 100644 index 00000000000..0579d51acf6 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto @@ -0,0 +1,730 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1;service"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Managed Apache Airflow Environments. +service Environments { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new environment. + rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Get an existing environment. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List environments. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Update an environment. + rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "name,environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Delete an environment. + rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } +} + +// Create a new environment. +message CreateEnvironmentRequest { + // The parent must be of the form + // "projects/{projectId}/locations/{locationId}". + string parent = 1; + + // The environment to create. + Environment environment = 2; +} + +// Get an environment. +message GetEnvironmentRequest { + // The resource name of the environment to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// List environments in a project and location. +message ListEnvironmentsRequest { + // List environments in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of environments to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The environments in a project and location. +message ListEnvironmentsResponse { + // The list of environments returned by a ListEnvironmentsRequest. + repeated Environment environments = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Delete an environment. +message DeleteEnvironmentRequest { + // The environment to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Update an environment. +message UpdateEnvironmentRequest { + // The relative resource name of the environment to update, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 2; + + // A patch environment. Fields specified by the `updateMask` will be copied + // from the patch environment into the environment under update. + Environment environment = 1; + + // Required. A comma-separated list of paths, relative to `Environment`, of + // fields to update. + // For example, to set the version of scikit-learn to install in the + // environment to 0.19.0 and to remove an existing installation of + // numpy, the `updateMask` parameter would include the following two + // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + // "config.softwareConfig.pypiPackages.numpy". The included patch + // environment would specify the scikit-learn version as follows: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "scikit-learn":"==0.19.0" + // } + // } + // } + // } + // + // Note that in the above example, any existing PyPI packages + // other than scikit-learn and numpy will be unaffected. + // + // Only one update type may be included in a single request's `updateMask`. + // For example, one cannot update both the PyPI packages and + // labels in the same request. However, it is possible to update multiple + // members of a map field simultaneously in the same request. For example, + // to set the labels "label1" and "label2" while clearing "label3" (assuming + // it already exists), one can + // provide the paths "labels.label1", "labels.label2", and "labels.label3" + // and populate the patch environment as follows: + // + // { + // "labels":{ + // "label1":"new-label1-value" + // "label2":"new-label2-value" + // } + // } + // + // Note that in the above example, any existing labels that are not + // included in the `updateMask` will be unaffected. + // + // It is also possible to replace an entire map field by providing the + // map field's path in the `updateMask`. The new value of the field will + // be that which is provided in the patch environment. For example, to + // delete all pre-existing user-specified PyPI packages and + // install botocore at version 1.7.14, the `updateMask` would contain + // the path "config.softwareConfig.pypiPackages", and + // the patch environment would be the following: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "botocore":"==1.7.14" + // } + // } + // } + // } + // + // **Note:** Only the following fields can be updated: + // + // * `config.softwareConfig.pypiPackages` + // * Replace all custom custom PyPI packages. If a replacement + // package map is not included in `environment`, all custom + // PyPI packages are cleared. It is an error to provide both + // this mask and a mask specifying an individual package. + // * `config.softwareConfig.pypiPackages.`packagename + // * Update the custom PyPI package *packagename*, + // preserving other packages. To delete the package, include it in + // `updateMask`, and omit the mapping for it in + // `environment.config.softwareConfig.pypiPackages`. It is an error + // to provide both a mask of this form and the + // `config.softwareConfig.pypiPackages` mask. + // * `labels` + // * Replace all environment labels. If a replacement labels map is not + // included in `environment`, all labels are cleared. It is an error to + // provide both this mask and a mask specifying one or more individual + // labels. + // * `labels.`labelName + // * Set the label named *labelName*, while preserving other + // labels. To delete the label, include it in `updateMask` and omit its + // mapping in `environment.labels`. It is an error to provide both a + // mask of this form and the `labels` mask. + // * `config.nodeCount` + // * Horizontally scale the number of nodes in the environment. An integer + // greater than or equal to 3 must be provided in the `config.nodeCount` + // field. + // * `config.webServerNetworkAccessControl` + // * Replace the environment's current `WebServerNetworkAccessControl`. + // * `config.databaseConfig` + // * Replace the environment's current `DatabaseConfig`. + // * `config.webServerConfig` + // * Replace the environment's current `WebServerConfig`. + // * `config.softwareConfig.airflowConfigOverrides` + // * Replace all Apache Airflow config overrides. If a replacement config + // overrides map is not included in `environment`, all config overrides + // are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual config overrides. + // * `config.softwareConfig.airflowConfigOverrides.`section-name + // * Override the Apache Airflow config property *name* in the + // section named *section*, preserving other properties. To + // delete the property override, include it in `updateMask` and omit its + // mapping in + // `environment.config.softwareConfig.airflowConfigOverrides`. + // It is an error to provide both a mask of this form and the + // `config.softwareConfig.airflowConfigOverrides` mask. + // * `config.softwareConfig.envVariables` + // * Replace all environment variables. If a replacement environment + // variable map is not included in `environment`, all custom environment + // variables are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual environment variables. + google.protobuf.FieldMask update_mask = 3; +} + +// Configuration information for an environment. +message EnvironmentConfig { + // Output only. The Kubernetes Engine cluster used to run this environment. + string gke_cluster = 1; + + // Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud + // Storage objects reside in a flat namespace, a hierarchical file tree + // can be simulated using "/"-delimited object name prefixes. DAG objects for + // this environment reside in a simulated directory with the given prefix. + string dag_gcs_prefix = 2; + + // The number of nodes in the Kubernetes Engine cluster that will be + // used to run this environment. + int32 node_count = 3; + + // The configuration settings for software inside the environment. + SoftwareConfig software_config = 4; + + // The configuration used for the Kubernetes Engine cluster. + NodeConfig node_config = 5; + + // The configuration used for the Private IP Cloud Composer environment. + PrivateEnvironmentConfig private_environment_config = 7; + + // Optional. The network-level access control policy for the Airflow web server. If + // unspecified, no network-level access restrictions will be applied. + WebServerNetworkAccessControl web_server_network_access_control = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for Cloud SQL instance used internally by Apache + // Airflow software. + DatabaseConfig database_config = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for the Airflow web server App Engine instance. + WebServerConfig web_server_config = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The encryption options for the Cloud Composer environment + // and its dependencies. Cannot be updated. + EncryptionConfig encryption_config = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The URI of the Apache Airflow Web UI hosted within this environment (see + // [Airflow web + // interface](/composer/docs/how-to/accessing/airflow-web-interface)). + string airflow_uri = 6; +} + +// Network-level access control policy for the Airflow web server. +message WebServerNetworkAccessControl { + // Allowed IP range with user-provided description. + message AllowedIpRange { + // IP address or range, defined using CIDR notation, of requests that this + // rule applies to. + // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + // + // IP range prefixes should be properly truncated. For example, + // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + // `2001:db8::1/32` should be truncated to `2001:db8::/32`. + string value = 1; + + // Optional. User-provided description. It must contain at most 300 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // A collection of allowed IP ranges with descriptions. + repeated AllowedIpRange allowed_ip_ranges = 1; +} + +// The configuration of Cloud SQL instance that is used by the Apache Airflow +// software. +message DatabaseConfig { + // Optional. Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for the Airflow web server App Engine instance. +message WebServerConfig { + // Optional. Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + // composer-n1-webserver-8. + // If not specified, composer-n1-webserver-2 will be used. + // Value custom is returned only in response, if Airflow web server parameters + // were manually changed to a non-standard values. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The encryption options for the Cloud Composer environment +// and its dependencies. +message EncryptionConfig { + // Optional. Customer-managed Encryption Key available through Google's Key Management + // Service. Cannot be updated. + // If not specified, Google-managed key will be used. + string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Specifies the selection and configuration of software inside the environment. +message SoftwareConfig { + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the version is a + // [semantic version](https://semver.org) or `latest`. When the patch version + // is omitted, the current Cloud Composer patch version is selected. + // When `latest` is provided instead of an explicit version number, + // the server replaces `latest` with the current Cloud Composer version + // and stores that version number in the same field. + // + // The portion of the image version that follows *airflow-* is an + // official Apache Airflow repository + // [release name](https://github.com/apache/incubator-airflow/releases). + // + // See also [Version + // List](/composer/docs/concepts/versioning/composer-versions). + string image_version = 1; + + // Optional. Apache Airflow configuration properties to override. + // + // Property keys contain the section and property names, separated by a + // hyphen, for example "core-dags_are_paused_at_creation". Section names must + // not contain hyphens ("-"), opening square brackets ("["), or closing + // square brackets ("]"). The property name must not be empty and must not + // contain an equals sign ("=") or semicolon (";"). Section and property names + // must not contain a period ("."). Apache Airflow configuration property + // names must be written in + // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + // contain any character, and can be written in any lower/upper case format. + // + // Certain Apache Airflow configuration property values are + // [blocked](/composer/docs/concepts/airflow-configurations), + // and cannot be overridden. + map airflow_config_overrides = 2; + + // Optional. Custom Python Package Index (PyPI) packages to be installed in + // the environment. + // + // Keys refer to the lowercase package name such as "numpy" + // and values are the lowercase extras and version specifier such as + // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + // package without pinning it to a version specifier, use the empty string as + // the value. + map pypi_packages = 3; + + // Optional. Additional environment variables to provide to the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Environment variable names must match the regular expression + // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + // software configuration overrides (they cannot match the regular expression + // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + // following reserved names: + // + // * `AIRFLOW_HOME` + // * `C_FORCE_ROOT` + // * `CONTAINER_NAME` + // * `DAGS_FOLDER` + // * `GCP_PROJECT` + // * `GCS_BUCKET` + // * `GKE_CLUSTER_NAME` + // * `SQL_DATABASE` + // * `SQL_INSTANCE` + // * `SQL_PASSWORD` + // * `SQL_PROJECT` + // * `SQL_REGION` + // * `SQL_USER` + map env_variables = 4; + + // Optional. The major version of Python used to run the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + // updated. + string python_version = 6; +} + +// Configuration for controlling how IPs are allocated in the +// GKE cluster running the Apache Airflow software. +message IPAllocationPolicy { + // Optional. Whether or not to enable Alias IPs in the GKE cluster. + // If `true`, a VPC-native cluster is created. + bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Configuration of allocating IP addresses for pods in the GKE cluster. + oneof cluster_ip_allocation { + // Optional. The name of the GKE cluster's secondary range used to allocate + // IP addresses to pods. + // + // This field is applicable only when `use_ip_aliases` is true. + string cluster_secondary_range_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range used to allocate IP addresses to pods in + // the GKE cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration of allocating IP addresses for services in the GKE cluster. + oneof services_ip_allocation { + // Optional. The name of the services' secondary range used to allocate + // IP addresses to the GKE cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + string services_secondary_range_name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range of the services IP addresses in this + // GKE cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string services_ipv4_cidr_block = 5 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// The configuration information for the Kubernetes Engine nodes running +// the Apache Airflow software. +message NodeConfig { + // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + // to deploy the VMs used to run the Apache Airflow software, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}". + // + // This `location` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.machineType` are specified, + // `nodeConfig.machineType` must belong to this `location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If only one field (`location` or `nodeConfig.machineType`) is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + string location = 1; + + // Optional. The Compute Engine + // [machine type](/compute/docs/machine-types) used for cluster instances, + // specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + // + // The `machineType` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.location` are specified, + // this `machineType` must belong to the `nodeConfig.location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If exactly one of this field and `nodeConfig.location` is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + // + // The `machineTypeId` must not be a [shared-core machine + // type](/compute/docs/machine-types#sharedcore). + // + // If this field is unspecified, the `machineTypeId` defaults + // to "n1-standard-1". + string machine_type = 2; + + // Optional. The Compute Engine network to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/global/networks/{networkId}". + // + // If unspecified, the "default" network ID in the environment's project is + // used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + // is provided, `nodeConfig.subnetwork` must also be provided. For + // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + // `nodeConfig.subnetwork`. + string network = 3; + + // Optional. The Compute Engine subnetwork to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + // + // If a subnetwork is provided, `nodeConfig.network` must also be provided, + // and the subnetwork must belong to the enclosing environment's project and + // location. + string subnetwork = 4; + + // Optional. The disk size in GB used for node VMs. Minimum size is 20GB. + // If unspecified, defaults to 100GB. Cannot be updated. + int32 disk_size_gb = 5; + + // Optional. The set of Google API scopes to be made available on all + // node VMs. If `oauth_scopes` is empty, defaults to + // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + repeated string oauth_scopes = 6; + + // Optional. The Google Cloud Platform Service Account to be used by the node + // VMs. If a service account is not specified, the "default" Compute Engine + // service account is used. Cannot be updated. + string service_account = 7; + + // Optional. The list of instance tags applied to all node VMs. Tags are used + // to identify valid sources or targets for network firewalls. Each tag within + // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + // Cannot be updated. + repeated string tags = 8; + + // Optional. The configuration for controlling how IPs are allocated in the GKE cluster. + IPAllocationPolicy ip_allocation_policy = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the private GKE cluster in a Cloud Composer +// environment. +message PrivateClusterConfig { + // Optional. If `true`, access to the public endpoint of the GKE cluster is + // denied. + bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If + // left blank, the default value of '172.16.0.0/23' is used. + string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range in CIDR notation to use for the hosted master network. This + // range is used for assigning internal IP addresses to the GKE cluster + // master or set of masters and to the internal load balancer virtual IP. + // This range must not overlap with any other ranges in use + // within the cluster's network. + string master_ipv4_reserved_range = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The configuration information for configuring a Private IP Cloud Composer +// environment. +message PrivateEnvironmentConfig { + // Optional. If `true`, a Private IP Cloud Composer environment is created. + // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + // set to true. + bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the private GKE cluster for a Private IP + // Cloud Composer environment. + PrivateClusterConfig private_cluster_config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range for web server will be reserved. Needs + // to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and + // `cloud_sql_ipv4_cidr_block`. + string web_server_ipv4_cidr_block = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range in tenant project will be reserved for + // Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`. + string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's App Engine VMs. + string web_server_ipv4_reserved_range = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An environment for running orchestration tasks. +message Environment { + option (google.api.resource) = { + type: "composer.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/environments/{environment}" + }; + + // State of the environment. + enum State { + // The state of the environment is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is in the process of being created. + CREATING = 1; + + // The environment is currently running and healthy. It is ready for use. + RUNNING = 2; + + // The environment is being updated. It remains usable but cannot receive + // additional update requests or be deleted at this time. + UPDATING = 3; + + // The environment is undergoing deletion. It cannot be used. + DELETING = 4; + + // The environment has encountered an error and cannot be used. + ERROR = 5; + } + + // The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + // + // EnvironmentId must start with a lowercase letter followed by up to 63 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string name = 1; + + // Configuration parameters for this environment. + EnvironmentConfig config = 2; + + // Output only. The UUID (Universally Unique IDentifier) associated with this environment. + // This value is generated when the environment is created. + string uuid = 3; + + // The current state of the environment. + State state = 4; + + // Output only. The time at which this environment was created. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time at which this environment was last modified. + google.protobuf.Timestamp update_time = 6; + + // Optional. User-defined labels for this environment. + // The labels map can contain no more than 64 entries. Entries of the labels + // map are UTF8 strings that comply with the following restrictions: + // + // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + // * Both keys and values are additionally constrained to be <= 128 bytes in + // size. + map labels = 7; +} + +// Message containing information about the result of an upgrade check +// operation. +message CheckUpgradeResponse { + // Whether there were python modules conflict during image build. + enum ConflictResult { + // It is unknown whether build had conflicts or not. + CONFLICT_RESULT_UNSPECIFIED = 0; + + // There were python packages conflicts. + CONFLICT = 1; + + // There were no python packages conflicts. + NO_CONFLICT = 2; + } + + // Output only. Url for a docker build log of an upgraded image. + string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether build has succeeded or failed on modules conflicts. + ConflictResult contains_pypi_modules_conflict = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Extract from a docker image build log containing information about pypi + // modules conflicts. + string pypi_conflict_build_log_extract = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Composer image for which the build was happening. + string image_version = 5; + + // Pypi dependencies specified in the environment configuration, at the time + // when the build was triggered. + map pypi_dependencies = 6; +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto new file mode 100644 index 00000000000..ea65c8d8541 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto @@ -0,0 +1,88 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1;service"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Readonly service to query available ImageVersions. +service ImageVersions { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // List ImageVersions for provided location. + rpc ListImageVersions(ListImageVersionsRequest) returns (ListImageVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/imageVersions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// List ImageVersions in a project and location. +message ListImageVersionsRequest { + // List ImageVersions in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of image_versions to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // Whether or not image versions from old releases should be included. + bool include_past_releases = 4; +} + +// The ImageVersions in a project and location. +message ListImageVersionsResponse { + // The list of supported ImageVersions in a location. + repeated ImageVersion image_versions = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// ImageVersion information +message ImageVersion { + // The string identifier of the ImageVersion, in the form: + // "composer-x.y.z-airflow-a.b(.c)" + string image_version_id = 1; + + // Whether this is the default ImageVersion used by Composer during + // environment creation if no input ImageVersion is specified. + bool is_default = 2; + + // supported python versions + repeated string supported_python_versions = 3; + + // The date of the version release. + google.type.Date release_date = 4; + + // Whether it is impossible to create an environment with the image version. + bool creation_disabled = 5; + + // Whether it is impossible to upgrade an environment running with the image + // version. + bool upgrade_disabled = 6; +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/operations.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/operations.proto new file mode 100644 index 00000000000..5d452fd5ee7 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/operations.proto @@ -0,0 +1,88 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1;service"; +option java_multiple_files = true; +option java_outer_classname = "OperationsProto"; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Metadata describing an operation. +message OperationMetadata { + // An enum describing the overall state of an operation. + enum State { + option allow_alias = true; + + // Unused. + STATE_UNSPECIFIED = 0; + + // The operation has been created but is not yet started. + PENDING = 1; + + // The operation is underway. + RUNNING = 2; + + // The operation completed successfully. + SUCCEEDED = 3; + + SUCCESSFUL = 3; + + // The operation is no longer running but did not succeed. + FAILED = 4; + } + + // Type of longrunning operation. + enum Type { + // Unused. + TYPE_UNSPECIFIED = 0; + + // A resource creation operation. + CREATE = 1; + + // A resource deletion operation. + DELETE = 2; + + // A resource update operation. + UPDATE = 3; + + // A resource check operation. + CHECK = 4; + } + + // Output only. The current operation state. + State state = 1; + + // Output only. The type of operation being performed. + Type operation_type = 2; + + // Output only. The resource being operated on, as a [relative resource name]( + // /apis/design/resource_names#relative_resource_name). + string resource = 3; + + // Output only. The UUID of the resource being operated on. + string resource_uuid = 4; + + // Output only. The time the operation was submitted to the server. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time when the operation terminated, regardless of its success. + // This field is unset if the operation is still ongoing. + google.protobuf.Timestamp end_time = 6; +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto new file mode 100644 index 00000000000..76fb19ee49e --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -0,0 +1,971 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1beta1;service"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Managed Apache Airflow Environments. +service Environments { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new environment. + rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Get an existing environment. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List environments. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Update an environment. + rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/locations/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "name,environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Delete an environment. + rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Restart Airflow web server. + rpc RestartWebServer(RestartWebServerRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Check if an upgrade operation on the environment will succeed. + // + // In case of problems detailed info can be found in the returned Operation. + rpc CheckUpgrade(CheckUpgradeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } +} + +// Create a new environment. +message CreateEnvironmentRequest { + // The parent must be of the form + // "projects/{projectId}/locations/{locationId}". + string parent = 1; + + // The environment to create. + Environment environment = 2; +} + +// Get an environment. +message GetEnvironmentRequest { + // The resource name of the environment to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// List environments in a project and location. +message ListEnvironmentsRequest { + // List environments in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of environments to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The environments in a project and location. +message ListEnvironmentsResponse { + // The list of environments returned by a ListEnvironmentsRequest. + repeated Environment environments = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Delete an environment. +message DeleteEnvironmentRequest { + // The environment to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Update an environment. +message UpdateEnvironmentRequest { + // The relative resource name of the environment to update, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 2; + + // A patch environment. Fields specified by the `updateMask` will be copied + // from the patch environment into the environment under update. + Environment environment = 1; + + // Required. A comma-separated list of paths, relative to `Environment`, of + // fields to update. + // For example, to set the version of scikit-learn to install in the + // environment to 0.19.0 and to remove an existing installation of + // argparse, the `updateMask` parameter would include the following two + // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + // "config.softwareConfig.pypiPackages.argparse". The included patch + // environment would specify the scikit-learn version as follows: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "scikit-learn":"==0.19.0" + // } + // } + // } + // } + // + // Note that in the above example, any existing PyPI packages + // other than scikit-learn and argparse will be unaffected. + // + // Only one update type may be included in a single request's `updateMask`. + // For example, one cannot update both the PyPI packages and + // labels in the same request. However, it is possible to update multiple + // members of a map field simultaneously in the same request. For example, + // to set the labels "label1" and "label2" while clearing "label3" (assuming + // it already exists), one can + // provide the paths "labels.label1", "labels.label2", and "labels.label3" + // and populate the patch environment as follows: + // + // { + // "labels":{ + // "label1":"new-label1-value" + // "label2":"new-label2-value" + // } + // } + // + // Note that in the above example, any existing labels that are not + // included in the `updateMask` will be unaffected. + // + // It is also possible to replace an entire map field by providing the + // map field's path in the `updateMask`. The new value of the field will + // be that which is provided in the patch environment. For example, to + // delete all pre-existing user-specified PyPI packages and + // install botocore at version 1.7.14, the `updateMask` would contain + // the path "config.softwareConfig.pypiPackages", and + // the patch environment would be the following: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "botocore":"==1.7.14" + // } + // } + // } + // } + // + // **Note:** Only the following fields can be updated: + // + // * `config.softwareConfig.pypiPackages` + // * Replace all custom custom PyPI packages. If a replacement + // package map is not included in `environment`, all custom + // PyPI packages are cleared. It is an error to provide both + // this mask and a mask specifying an individual package. + // * `config.softwareConfig.pypiPackages.`packagename + // * Update the custom PyPI package *packagename*, + // preserving other packages. To delete the package, include it in + // `updateMask`, and omit the mapping for it in + // `environment.config.softwareConfig.pypiPackages`. It is an error + // to provide both a mask of this form and the + // `config.softwareConfig.pypiPackages` mask. + // * `labels` + // * Replace all environment labels. If a replacement labels map is not + // included in `environment`, all labels are cleared. It is an error to + // provide both this mask and a mask specifying one or more individual + // labels. + // * `labels.`labelName + // * Set the label named *labelName*, while preserving other + // labels. To delete the label, include it in `updateMask` and omit its + // mapping in `environment.labels`. It is an error to provide both a + // mask of this form and the `labels` mask. + // * `config.nodeCount` + // * Horizontally scale the number of nodes in the environment. An integer + // greater than or equal to 3 must be provided in the `config.nodeCount` + // field. * `config.webServerNetworkAccessControl` + // * Replace the environment's current WebServerNetworkAccessControl. + // * `config.softwareConfig.airflowConfigOverrides` + // * Replace all Apache Airflow config overrides. If a replacement config + // overrides map is not included in `environment`, all config overrides + // are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual config overrides. + // * `config.softwareConfig.airflowConfigOverrides.`section-name + // * Override the Apache Airflow config property *name* in the + // section named *section*, preserving other properties. To + // delete the property override, include it in `updateMask` and omit its + // mapping in + // `environment.config.softwareConfig.airflowConfigOverrides`. + // It is an error to provide both a mask of this form and the + // `config.softwareConfig.airflowConfigOverrides` mask. + // * `config.softwareConfig.envVariables` + // * Replace all environment variables. If a replacement environment + // variable map is not included in `environment`, all custom environment + // variables are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual environment variables. + // * `config.softwareConfig.imageVersion` + // * Upgrade the version of the environment in-place. Refer to + // `SoftwareConfig.image_version` for information on how to format the + // new image version. Additionally, the new image version cannot effect + // a version downgrade and must match the current image version's + // Composer major version and Airflow major and minor versions. Consult + // the [Cloud Composer Version + // List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) + // for valid values. + // * `config.softwareConfig.schedulerCount` + // * Horizontally scale the number of schedulers in Airflow. A positive + // integer not greater than the number of nodes must be provided in the + // `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType` + // * Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, + // db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType` + // * Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + // or composer-n1-webserver-8. * `config.maintenanceWindow` + // * Maintenance window during which Cloud Composer components may be + // under maintenance. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Restart Airflow web server. +message RestartWebServerRequest { + // The resource name of the environment to restart the web server for, in the + // form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Configuration information for an environment. +message EnvironmentConfig { + // The size of the Cloud Composer environment. + enum EnvironmentSize { + // The size of the environment is unspecified. + ENVIRONMENT_SIZE_UNSPECIFIED = 0; + + // The environment size is small. + ENVIRONMENT_SIZE_SMALL = 1; + + // The environment size is medium. + ENVIRONMENT_SIZE_MEDIUM = 2; + + // The environment size is large. + ENVIRONMENT_SIZE_LARGE = 3; + } + + // Output only. The Kubernetes Engine cluster used to run this environment. + string gke_cluster = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud + // Storage objects reside in a flat namespace, a hierarchical file tree + // can be simulated using "/"-delimited object name prefixes. DAG objects for + // this environment reside in a simulated directory with the given prefix. + string dag_gcs_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The number of nodes in the Kubernetes Engine cluster that will be + // used to run this environment. + int32 node_count = 3; + + // The configuration settings for software inside the environment. + SoftwareConfig software_config = 4; + + // The configuration used for the Kubernetes Engine cluster. + NodeConfig node_config = 5; + + // The configuration used for the Private IP Cloud Composer environment. + PrivateEnvironmentConfig private_environment_config = 7; + + // Optional. The network-level access control policy for the Airflow web server. If + // unspecified, no network-level access restrictions will be applied. + WebServerNetworkAccessControl web_server_network_access_control = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for Cloud SQL instance used internally by Apache + // Airflow software. + DatabaseConfig database_config = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for the Airflow web server App Engine instance. + WebServerConfig web_server_config = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The URI of the Apache Airflow Web UI hosted within this environment (see + // [Airflow web + // interface](/composer/docs/how-to/accessing/airflow-web-interface)). + string airflow_uri = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The encryption options for the Cloud Composer environment and its + // dependencies. Cannot be updated. + EncryptionConfig encryption_config = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maintenance window is the period when Cloud Composer components may + // undergo maintenance. It is defined so that maintenance is not executed + // during peak hours or critical time periods. + // + // The system will not be under maintenance for every occurrence of this + // window, but when maintenance is planned, it will be scheduled + // during the window. + // + // The maintenance window period must encompass at least 12 hours per week. + // This may be split into multiple chunks, each with a size of + // at least 4 hours. + // + // If this value is omitted, Cloud Composer components may be subject to + // maintenance at any time. + MaintenanceWindow maintenance_window = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The workloads configuration settings for the GKE cluster associated with + // the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web + // server and workers workloads. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + WorkloadsConfig workloads_config = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The size of the Cloud Composer environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + EnvironmentSize environment_size = 16 [(google.api.field_behavior) = OPTIONAL]; +} + +// Network-level access control policy for the Airflow web server. +message WebServerNetworkAccessControl { + // Allowed IP range with user-provided description. + message AllowedIpRange { + // IP address or range, defined using CIDR notation, of requests that this + // rule applies to. + // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + // + // IP range prefixes should be properly truncated. For example, + // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + // `2001:db8::1/32` should be truncated to `2001:db8::/32`. + string value = 1; + + // Optional. User-provided description. It must contain at most 300 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // A collection of allowed IP ranges with descriptions. + repeated AllowedIpRange allowed_ip_ranges = 1; +} + +// Specifies the selection and configuration of software inside the environment. +message SoftwareConfig { + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the version is a + // [semantic version](https://semver.org) or `latest`. When the patch version + // is omitted, the current Cloud Composer patch version is selected. + // When `latest` is provided instead of an explicit version number, + // the server replaces `latest` with the current Cloud Composer version + // and stores that version number in the same field. + // + // The portion of the image version that follows *airflow-* is an + // official Apache Airflow repository + // [release name](https://github.com/apache/incubator-airflow/releases). + // + // See also [Version + // List](/composer/docs/concepts/versioning/composer-versions). + string image_version = 1; + + // Optional. Apache Airflow configuration properties to override. + // + // Property keys contain the section and property names, separated by a + // hyphen, for example "core-dags_are_paused_at_creation". Section names must + // not contain hyphens ("-"), opening square brackets ("["), or closing + // square brackets ("]"). The property name must not be empty and must not + // contain an equals sign ("=") or semicolon (";"). Section and property names + // must not contain a period ("."). Apache Airflow configuration property + // names must be written in + // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + // contain any character, and can be written in any lower/upper case format. + // + // Certain Apache Airflow configuration property values are + // [blocked](/composer/docs/concepts/airflow-configurations), + // and cannot be overridden. + map airflow_config_overrides = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom Python Package Index (PyPI) packages to be installed in + // the environment. + // + // Keys refer to the lowercase package name such as "numpy" + // and values are the lowercase extras and version specifier such as + // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + // package without pinning it to a version specifier, use the empty string as + // the value. + map pypi_packages = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional environment variables to provide to the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Environment variable names must match the regular expression + // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + // software configuration overrides (they cannot match the regular expression + // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + // following reserved names: + // + // * `AIRFLOW_HOME` + // * `C_FORCE_ROOT` + // * `CONTAINER_NAME` + // * `DAGS_FOLDER` + // * `GCP_PROJECT` + // * `GCS_BUCKET` + // * `GKE_CLUSTER_NAME` + // * `SQL_DATABASE` + // * `SQL_INSTANCE` + // * `SQL_PASSWORD` + // * `SQL_PROJECT` + // * `SQL_REGION` + // * `SQL_USER` + map env_variables = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The major version of Python used to run the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + // updated. + string python_version = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for controlling how IPs are allocated in the +// GKE cluster. +message IPAllocationPolicy { + // Optional. Whether or not to enable Alias IPs in the GKE cluster. + // If `true`, a VPC-native cluster is created. + bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the cluster's secondary range used to allocate + // IP addresses to pods. Specify either `cluster_secondary_range_name` + // or `cluster_ipv4_cidr_block` but not both. + // + // This field is applicable only when `use_ip_aliases` is true. + string cluster_secondary_range_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the services' secondary range used to allocate + // IP addresses to the cluster. Specify either `services_secondary_range_name` + // or `services_ipv4_cidr_block` but not both. + // + // This field is applicable only when `use_ip_aliases` is true. + string services_secondary_range_name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range used to allocate IP addresses to pods in + // the cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + // Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block` + // but not both. + string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range of the services IP addresses in this + // cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + // Specify `services_secondary_range_name` or `services_ipv4_cidr_block` + // but not both. + string services_ipv4_cidr_block = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration information for the Kubernetes Engine nodes running +// the Apache Airflow software. +message NodeConfig { + // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + // to deploy the VMs used to run the Apache Airflow software, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}". + // + // This `location` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.machineType` are specified, + // `nodeConfig.machineType` must belong to this `location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If only one field (`location` or `nodeConfig.machineType`) is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + string location = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine + // [machine type](/compute/docs/machine-types) used for cluster instances, + // specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + // + // The `machineType` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.location` are specified, + // this `machineType` must belong to the `nodeConfig.location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If exactly one of this field and `nodeConfig.location` is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + // + // The `machineTypeId` must not be a [shared-core machine + // type](/compute/docs/machine-types#sharedcore). + // + // If this field is unspecified, the `machineTypeId` defaults + // to "n1-standard-1". + string machine_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine network to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/global/networks/{networkId}". + // + // If unspecified, the default network in the environment's project is used. + // If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + // is provided, `nodeConfig.subnetwork` must also be provided. For + // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + // `nodeConfig.subnetwork`. + string network = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine subnetwork to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + // + // If a subnetwork is provided, `nodeConfig.network` must also be provided, + // and the subnetwork must belong to the enclosing environment's project and + // location. + string subnetwork = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The disk size in GB used for node VMs. Minimum size is 20GB. + // If unspecified, defaults to 100GB. Cannot be updated. + int32 disk_size_gb = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of Google API scopes to be made available on all + // node VMs. If `oauth_scopes` is empty, defaults to + // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + repeated string oauth_scopes = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Google Cloud Platform Service Account to be used by the workloads. If a + // service account is not specified, the "default" Compute Engine service + // account is used. Cannot be updated. + string service_account = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of instance tags applied to all node VMs. Tags are used + // to identify valid sources or targets for network firewalls. Each tag within + // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + // Cannot be updated. + repeated string tags = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IPAllocationPolicy fields for the GKE cluster. + IPAllocationPolicy ip_allocation_policy = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of pods per node in the Cloud Composer GKE cluster. + // The value must be between 8 and 110 and it can be set only if + // the environment is VPC-native. + // The default value is 32. Values of this field will be propagated both to + // the `default-pool` node pool of the newly created GKE cluster, and to the + // default "Maximum Pods per Node" value which is used for newly created + // node pools if their value is not explicitly set during node pool creation. + // For more information, see [Optimizing IP address allocation] + // (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr). + // Cannot be updated. + int32 max_pods_per_node = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the private GKE cluster in a Cloud Composer +// environment. +message PrivateClusterConfig { + // Optional. If `true`, access to the public endpoint of the GKE cluster is + // denied. + bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If + // left blank, the default value of '172.16.0.0/23' is used. + string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range in CIDR notation to use for the hosted master network. This + // range is used for assigning internal IP addresses to the cluster + // master or set of masters and to the internal load balancer virtual IP. + // This range must not overlap with any other ranges in use + // within the cluster's network. + string master_ipv4_reserved_range = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The configuration information for configuring a Private IP Cloud Composer +// environment. +message PrivateEnvironmentConfig { + // Optional. If `true`, a Private IP Cloud Composer environment is created. + // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + // set to true . + bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the private GKE cluster for a Private IP + // Cloud Composer environment. + PrivateClusterConfig private_cluster_config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range for web server will be reserved. Needs + // to be disjoint from private_cluster_config.master_ipv4_cidr_block and + // cloud_sql_ipv4_cidr_block. + string web_server_ipv4_cidr_block = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range in tenant project will be reserved for + // Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block + string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's App Engine VMs. + string web_server_ipv4_reserved_range = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The CIDR block from which IP range for Cloud Composer Network in tenant + // project will be reserved. Needs to be disjoint from + // private_cluster_config.master_ipv4_cidr_block and + // cloud_sql_ipv4_cidr_block. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + string cloud_composer_network_ipv4_cidr_block = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's Cloud Composer network. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + string cloud_composer_network_ipv4_reserved_range = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The configuration of Cloud SQL instance that is used by the Apache Airflow +// software. +message DatabaseConfig { + // Optional. Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for the Airflow web server App Engine instance. +message WebServerConfig { + // Optional. Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + // composer-n1-webserver-8. + // If not specified, composer-n1-webserver-2 will be used. + // Value custom is returned only in response, if Airflow web server parameters + // were manually changed to a non-standard values. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The encryption options for the Cloud Composer environment and its +// dependencies. +message EncryptionConfig { + // Optional. Customer-managed Encryption Key available through Google's Key Management + // Service. Cannot be updated. + // If not specified, Google-managed key will be used. + string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for Cloud Composer maintenance window. +// +// The following example: +// +// { +// "startTime":"2019-08-01T01:00:00Z" +// "endTime":"2019-08-01T07:00:00Z" +// "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" +// } +// +// would define a maintenance window between 01 and 07 hours UTC during +// each Tuesday and Wednesday. +message MaintenanceWindow { + // Required. Start time of the first recurrence of the maintenance window. + google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maintenance window end time. It is used only to calculate the duration of + // the maintenance window. + // The value for end_time must be in the future, relative to `start_time`. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maintenance window recurrence. Format is a subset of + // [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed + // values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` + // Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + string recurrence = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The Kubernetes workloads configuration for GKE cluster associated with the +// Cloud Composer environment. Supported for Cloud Composer environments in +// versions composer-2.*.*-airflow-*.*.* and newer. +message WorkloadsConfig { + // Configuration for resources used by Airflow schedulers. + message SchedulerResource { + // Optional. CPU request and limit for a single Airflow scheduler replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow scheduler replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow scheduler replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of schedulers. + int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow web server. + message WebServerResource { + // Optional. CPU request and limit for Airflow web server. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for Airflow web server. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for Airflow web server. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow workers. + message WorkerResource { + // Optional. CPU request and limit for a single Airflow worker replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow worker replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow worker replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum number of workers for autoscaling. + int32 min_count = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of workers for autoscaling. + int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Resources used by Airflow schedulers. + SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow web server. + WebServerResource web_server = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow workers. + WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// An environment for running orchestration tasks. +message Environment { + option (google.api.resource) = { + type: "composer.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/environments/{environment}" + }; + + // State of the environment. + enum State { + // The state of the environment is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is in the process of being created. + CREATING = 1; + + // The environment is currently running and healthy. It is ready for use. + RUNNING = 2; + + // The environment is being updated. It remains usable but cannot receive + // additional update requests or be deleted at this time. + UPDATING = 3; + + // The environment is undergoing deletion. It cannot be used. + DELETING = 4; + + // The environment has encountered an error and cannot be used. + ERROR = 5; + } + + // The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + // + // EnvironmentId must start with a lowercase letter followed by up to 63 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string name = 1; + + // Configuration parameters for this environment. + EnvironmentConfig config = 2; + + // Output only. The UUID (Universally Unique IDentifier) associated with this environment. + // This value is generated when the environment is created. + string uuid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The current state of the environment. + State state = 4; + + // Output only. The time at which this environment was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this environment was last modified. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for this environment. + // The labels map can contain no more than 64 entries. Entries of the labels + // map are UTF8 strings that comply with the following restrictions: + // + // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + // * Both keys and values are additionally constrained to be <= 128 bytes in + // size. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to check whether image upgrade will succeed. +message CheckUpgradeRequest { + // The resource name of the environment to check upgrade for, in the + // form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the version is a + // [semantic version](https://semver.org) or `latest`. When the patch version + // is omitted, the current Cloud Composer patch version is selected. + // When `latest` is provided instead of an explicit version number, + // the server replaces `latest` with the current Cloud Composer version + // and stores that version number in the same field. + // + // The portion of the image version that follows `airflow-` is an + // official Apache Airflow repository + // [release name](https://github.com/apache/incubator-airflow/releases). + // + // See also [Version List] + // (/composer/docs/concepts/versioning/composer-versions). + string image_version = 2; +} + +// Message containing information about the result of an upgrade check +// operation. +message CheckUpgradeResponse { + // Whether there were python modules conflict during image build. + enum ConflictResult { + // It is unknown whether build had conflicts or not. + CONFLICT_RESULT_UNSPECIFIED = 0; + + // There were python packages conflicts. + CONFLICT = 1; + + // There were no python packages conflicts. + NO_CONFLICT = 2; + } + + // Output only. Url for a docker build log of an upgraded image. + string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether build has succeeded or failed on modules conflicts. + ConflictResult contains_pypi_modules_conflict = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Extract from a docker image build log containing information about pypi + // modules conflicts. + string pypi_conflict_build_log_extract = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Composer image for which the build was happening. + string image_version = 5; + + // Pypi dependencies specified in the environment configuration, at the time + // when the build was triggered. + map pypi_dependencies = 6; +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto new file mode 100644 index 00000000000..6a7d5f4c6df --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto @@ -0,0 +1,88 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1beta1;service"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Readonly service to query available ImageVersions. +service ImageVersions { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // List ImageVersions for provided location. + rpc ListImageVersions(ListImageVersionsRequest) returns (ListImageVersionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/imageVersions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// List ImageVersions in a project and location. +message ListImageVersionsRequest { + // List ImageVersions in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of image_versions to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // Whether or not image versions from old releases should be included. + bool include_past_releases = 4; +} + +// The ImageVersions in a project and location. +message ListImageVersionsResponse { + // The list of supported ImageVersions in a location. + repeated ImageVersion image_versions = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Image Version information +message ImageVersion { + // The string identifier of the ImageVersion, in the form: + // "composer-x.y.z-airflow-a.b(.c)" + string image_version_id = 1; + + // Whether this is the default ImageVersion used by Composer during + // environment creation if no input ImageVersion is specified. + bool is_default = 2; + + // supported python versions + repeated string supported_python_versions = 3; + + // The date of the version release. + google.type.Date release_date = 4; + + // Whether it is impossible to create an environment with the image version. + bool creation_disabled = 5; + + // Whether it is impossible to upgrade an environment running with the image + // version. + bool upgrade_disabled = 6; +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto new file mode 100644 index 00000000000..00b4d21d745 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto @@ -0,0 +1,84 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1beta1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1beta1;service"; +option java_multiple_files = true; +option java_outer_classname = "OperationsProto"; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Metadata describing an operation. +message OperationMetadata { + // An enum describing the overall state of an operation. + enum State { + // Unused. + STATE_UNSPECIFIED = 0; + + // The operation has been created but is not yet started. + PENDING = 1; + + // The operation is underway. + RUNNING = 2; + + // The operation completed successfully. + SUCCESSFUL = 3; + + // The operation is no longer running but did not succeed. + FAILED = 4; + } + + // Type of longrunning operation. + enum Type { + // Unused. + TYPE_UNSPECIFIED = 0; + + // A resource creation operation. + CREATE = 1; + + // A resource deletion operation. + DELETE = 2; + + // A resource update operation. + UPDATE = 3; + + // A resource check operation. + CHECK = 4; + } + + // Output only. The current operation state. + State state = 1; + + // Output only. The type of operation being performed. + Type operation_type = 2; + + // Output only. The resource being operated on, as a [relative resource name]( + // /apis/design/resource_names#relative_resource_name). + string resource = 3; + + // Output only. The UUID of the resource being operated on. + string resource_uuid = 4; + + // Output only. The time the operation was submitted to the server. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time when the operation terminated, regardless of its success. + // This field is unset if the operation is still ongoing. + google.protobuf.Timestamp end_time = 6; +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts new file mode 100644 index 00000000000..bce1baa7a99 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts @@ -0,0 +1,11509 @@ +// 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. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace orchestration. */ + namespace orchestration { + + /** Namespace airflow. */ + namespace airflow { + + /** Namespace service. */ + namespace service { + + /** Namespace v1. */ + namespace v1 { + + /** 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 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.orchestration.airflow.service.v1.ICreateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironmentCallback): void; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest): 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.orchestration.airflow.service.v1.IGetEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironmentCallback): void; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest): Promise; + + /** + * 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.orchestration.airflow.service.v1.IListEnvironmentsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironmentsCallback): void; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise + */ + public listEnvironments(request: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest): 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.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironmentCallback): void; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise + */ + public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest): Promise; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironmentCallback): void; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise + */ + public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest): Promise; + } + + namespace Environments { + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#createEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#getEnvironment}. + * @param error Error, if any + * @param [response] Environment + */ + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.Environment) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#listEnvironments}. + * @param error Error, if any + * @param [response] ListEnvironmentsResponse + */ + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#updateEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#deleteEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { + + /** CreateEnvironmentRequest parent */ + parent?: (string|null); + + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); + } + + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { + + /** + * Constructs a new CreateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest); + + /** CreateEnvironmentRequest parent. */ + public parent: string; + + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; + + /** + * Verifies a CreateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @param message CreateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { + + /** GetEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { + + /** + * Constructs a new GetEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest); + + /** GetEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; + + /** + * Verifies a GetEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { + + /** ListEnvironmentsRequest parent */ + parent?: (string|null); + + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { + + /** + * Constructs a new ListEnvironmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest); + + /** ListEnvironmentsRequest parent. */ + public parent: string; + + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; + + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; + + /** + * Verifies a ListEnvironmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @param message ListEnvironmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { + + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.orchestration.airflow.service.v1.IEnvironment[]|null); + + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { + + /** + * Constructs a new ListEnvironmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse); + + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.orchestration.airflow.service.v1.IEnvironment[]; + + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; + + /** + * Verifies a ListEnvironmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @param message ListEnvironmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { + + /** DeleteEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { + + /** + * Constructs a new DeleteEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest); + + /** DeleteEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { + + /** UpdateEnvironmentRequest name */ + name?: (string|null); + + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); + + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { + + /** + * Constructs a new UpdateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest); + + /** UpdateEnvironmentRequest name. */ + public name: string; + + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); + + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnvironmentConfig. */ + interface IEnvironmentConfig { + + /** EnvironmentConfig gkeCluster */ + gkeCluster?: (string|null); + + /** EnvironmentConfig dagGcsPrefix */ + dagGcsPrefix?: (string|null); + + /** EnvironmentConfig nodeCount */ + nodeCount?: (number|null); + + /** EnvironmentConfig softwareConfig */ + softwareConfig?: (google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null); + + /** EnvironmentConfig nodeConfig */ + nodeConfig?: (google.cloud.orchestration.airflow.service.v1.INodeConfig|null); + + /** EnvironmentConfig privateEnvironmentConfig */ + privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null); + + /** EnvironmentConfig webServerNetworkAccessControl */ + webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null); + + /** EnvironmentConfig databaseConfig */ + databaseConfig?: (google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null); + + /** EnvironmentConfig webServerConfig */ + webServerConfig?: (google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null); + + /** EnvironmentConfig encryptionConfig */ + encryptionConfig?: (google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null); + + /** EnvironmentConfig airflowUri */ + airflowUri?: (string|null); + } + + /** Represents an EnvironmentConfig. */ + class EnvironmentConfig implements IEnvironmentConfig { + + /** + * Constructs a new EnvironmentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig); + + /** EnvironmentConfig gkeCluster. */ + public gkeCluster: string; + + /** EnvironmentConfig dagGcsPrefix. */ + public dagGcsPrefix: string; + + /** EnvironmentConfig nodeCount. */ + public nodeCount: number; + + /** EnvironmentConfig softwareConfig. */ + public softwareConfig?: (google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null); + + /** EnvironmentConfig nodeConfig. */ + public nodeConfig?: (google.cloud.orchestration.airflow.service.v1.INodeConfig|null); + + /** EnvironmentConfig privateEnvironmentConfig. */ + public privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null); + + /** EnvironmentConfig webServerNetworkAccessControl. */ + public webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null); + + /** EnvironmentConfig databaseConfig. */ + public databaseConfig?: (google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null); + + /** EnvironmentConfig webServerConfig. */ + public webServerConfig?: (google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null); + + /** EnvironmentConfig encryptionConfig. */ + public encryptionConfig?: (google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null); + + /** EnvironmentConfig airflowUri. */ + public airflowUri: string; + + /** + * Creates a new EnvironmentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EnvironmentConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; + + /** + * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. + * @param message EnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. + * @param message EnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; + + /** + * Verifies an EnvironmentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnvironmentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; + + /** + * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. + * @param message EnvironmentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.EnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnvironmentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WebServerNetworkAccessControl. */ + interface IWebServerNetworkAccessControl { + + /** WebServerNetworkAccessControl allowedIpRanges */ + allowedIpRanges?: (google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange[]|null); + } + + /** Represents a WebServerNetworkAccessControl. */ + class WebServerNetworkAccessControl implements IWebServerNetworkAccessControl { + + /** + * Constructs a new WebServerNetworkAccessControl. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl); + + /** WebServerNetworkAccessControl allowedIpRanges. */ + public allowedIpRanges: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange[]; + + /** + * Creates a new WebServerNetworkAccessControl instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerNetworkAccessControl instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; + + /** + * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. + * @param message WebServerNetworkAccessControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. + * @param message WebServerNetworkAccessControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; + + /** + * Verifies a WebServerNetworkAccessControl message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerNetworkAccessControl + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; + + /** + * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. + * @param message WebServerNetworkAccessControl + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerNetworkAccessControl to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WebServerNetworkAccessControl { + + /** Properties of an AllowedIpRange. */ + interface IAllowedIpRange { + + /** AllowedIpRange value */ + value?: (string|null); + + /** AllowedIpRange description */ + description?: (string|null); + } + + /** Represents an AllowedIpRange. */ + class AllowedIpRange implements IAllowedIpRange { + + /** + * Constructs a new AllowedIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange); + + /** AllowedIpRange value. */ + public value: string; + + /** AllowedIpRange description. */ + public description: string; + + /** + * Creates a new AllowedIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedIpRange instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @param message AllowedIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @param message AllowedIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Verifies an AllowedIpRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllowedIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. + * @param message AllowedIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a DatabaseConfig. */ + interface IDatabaseConfig { + + /** DatabaseConfig machineType */ + machineType?: (string|null); + } + + /** Represents a DatabaseConfig. */ + class DatabaseConfig implements IDatabaseConfig { + + /** + * Constructs a new DatabaseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig); + + /** DatabaseConfig machineType. */ + public machineType: string; + + /** + * Creates a new DatabaseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; + + /** + * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. + * @param message DatabaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. + * @param message DatabaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; + + /** + * Verifies a DatabaseConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; + + /** + * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. + * @param message DatabaseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DatabaseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WebServerConfig. */ + interface IWebServerConfig { + + /** WebServerConfig machineType */ + machineType?: (string|null); + } + + /** Represents a WebServerConfig. */ + class WebServerConfig implements IWebServerConfig { + + /** + * Constructs a new WebServerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerConfig); + + /** WebServerConfig machineType. */ + public machineType: string; + + /** + * Creates a new WebServerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerConfig): google.cloud.orchestration.airflow.service.v1.WebServerConfig; + + /** + * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. + * @param message WebServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. + * @param message WebServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerConfig; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerConfig; + + /** + * Verifies a WebServerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerConfig; + + /** + * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. + * @param message WebServerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; + + /** + * Verifies an EncryptionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SoftwareConfig. */ + interface ISoftwareConfig { + + /** SoftwareConfig imageVersion */ + imageVersion?: (string|null); + + /** SoftwareConfig airflowConfigOverrides */ + airflowConfigOverrides?: ({ [k: string]: string }|null); + + /** SoftwareConfig pypiPackages */ + pypiPackages?: ({ [k: string]: string }|null); + + /** SoftwareConfig envVariables */ + envVariables?: ({ [k: string]: string }|null); + + /** SoftwareConfig pythonVersion */ + pythonVersion?: (string|null); + } + + /** Represents a SoftwareConfig. */ + class SoftwareConfig implements ISoftwareConfig { + + /** + * Constructs a new SoftwareConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig); + + /** SoftwareConfig imageVersion. */ + public imageVersion: string; + + /** SoftwareConfig airflowConfigOverrides. */ + public airflowConfigOverrides: { [k: string]: string }; + + /** SoftwareConfig pypiPackages. */ + public pypiPackages: { [k: string]: string }; + + /** SoftwareConfig envVariables. */ + public envVariables: { [k: string]: string }; + + /** SoftwareConfig pythonVersion. */ + public pythonVersion: string; + + /** + * Creates a new SoftwareConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SoftwareConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; + + /** + * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. + * @param message SoftwareConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. + * @param message SoftwareConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; + + /** + * Verifies a SoftwareConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoftwareConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; + + /** + * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. + * @param message SoftwareConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.SoftwareConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoftwareConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a IPAllocationPolicy. */ + interface IIPAllocationPolicy { + + /** IPAllocationPolicy useIpAliases */ + useIpAliases?: (boolean|null); + + /** IPAllocationPolicy clusterSecondaryRangeName */ + clusterSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy clusterIpv4CidrBlock */ + clusterIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesSecondaryRangeName */ + servicesSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy servicesIpv4CidrBlock */ + servicesIpv4CidrBlock?: (string|null); + } + + /** Represents a IPAllocationPolicy. */ + class IPAllocationPolicy implements IIPAllocationPolicy { + + /** + * Constructs a new IPAllocationPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy); + + /** IPAllocationPolicy useIpAliases. */ + public useIpAliases: boolean; + + /** IPAllocationPolicy clusterSecondaryRangeName. */ + public clusterSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy clusterIpv4CidrBlock. */ + public clusterIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesSecondaryRangeName. */ + public servicesSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy servicesIpv4CidrBlock. */ + public servicesIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy clusterIpAllocation. */ + public clusterIpAllocation?: ("clusterSecondaryRangeName"|"clusterIpv4CidrBlock"); + + /** IPAllocationPolicy servicesIpAllocation. */ + public servicesIpAllocation?: ("servicesSecondaryRangeName"|"servicesIpv4CidrBlock"); + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns IPAllocationPolicy instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; + + /** + * Verifies a IPAllocationPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IPAllocationPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @param message IPAllocationPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NodeConfig. */ + interface INodeConfig { + + /** NodeConfig location */ + location?: (string|null); + + /** NodeConfig machineType */ + machineType?: (string|null); + + /** NodeConfig network */ + network?: (string|null); + + /** NodeConfig subnetwork */ + subnetwork?: (string|null); + + /** NodeConfig diskSizeGb */ + diskSizeGb?: (number|null); + + /** NodeConfig oauthScopes */ + oauthScopes?: (string[]|null); + + /** NodeConfig serviceAccount */ + serviceAccount?: (string|null); + + /** NodeConfig tags */ + tags?: (string[]|null); + + /** NodeConfig ipAllocationPolicy */ + ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null); + } + + /** Represents a NodeConfig. */ + class NodeConfig implements INodeConfig { + + /** + * Constructs a new NodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.INodeConfig); + + /** NodeConfig location. */ + public location: string; + + /** NodeConfig machineType. */ + public machineType: string; + + /** NodeConfig network. */ + public network: string; + + /** NodeConfig subnetwork. */ + public subnetwork: string; + + /** NodeConfig diskSizeGb. */ + public diskSizeGb: number; + + /** NodeConfig oauthScopes. */ + public oauthScopes: string[]; + + /** NodeConfig serviceAccount. */ + public serviceAccount: string; + + /** NodeConfig tags. */ + public tags: string[]; + + /** NodeConfig ipAllocationPolicy. */ + public ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null); + + /** + * Creates a new NodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.INodeConfig): google.cloud.orchestration.airflow.service.v1.NodeConfig; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.NodeConfig; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.NodeConfig; + + /** + * Verifies a NodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.NodeConfig; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @param message NodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PrivateClusterConfig. */ + interface IPrivateClusterConfig { + + /** PrivateClusterConfig enablePrivateEndpoint */ + enablePrivateEndpoint?: (boolean|null); + + /** PrivateClusterConfig masterIpv4CidrBlock */ + masterIpv4CidrBlock?: (string|null); + + /** PrivateClusterConfig masterIpv4ReservedRange */ + masterIpv4ReservedRange?: (string|null); + } + + /** Represents a PrivateClusterConfig. */ + class PrivateClusterConfig implements IPrivateClusterConfig { + + /** + * Constructs a new PrivateClusterConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig); + + /** PrivateClusterConfig enablePrivateEndpoint. */ + public enablePrivateEndpoint: boolean; + + /** PrivateClusterConfig masterIpv4CidrBlock. */ + public masterIpv4CidrBlock: string; + + /** PrivateClusterConfig masterIpv4ReservedRange. */ + public masterIpv4ReservedRange: string; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateClusterConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; + + /** + * Verifies a PrivateClusterConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateClusterConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @param message PrivateClusterConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PrivateEnvironmentConfig. */ + interface IPrivateEnvironmentConfig { + + /** PrivateEnvironmentConfig enablePrivateEnvironment */ + enablePrivateEnvironment?: (boolean|null); + + /** PrivateEnvironmentConfig privateClusterConfig */ + privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null); + + /** PrivateEnvironmentConfig webServerIpv4CidrBlock */ + webServerIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock */ + cloudSqlIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig webServerIpv4ReservedRange */ + webServerIpv4ReservedRange?: (string|null); + } + + /** Represents a PrivateEnvironmentConfig. */ + class PrivateEnvironmentConfig implements IPrivateEnvironmentConfig { + + /** + * Constructs a new PrivateEnvironmentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig); + + /** PrivateEnvironmentConfig enablePrivateEnvironment. */ + public enablePrivateEnvironment: boolean; + + /** PrivateEnvironmentConfig privateClusterConfig. */ + public privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null); + + /** PrivateEnvironmentConfig webServerIpv4CidrBlock. */ + public webServerIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. */ + public cloudSqlIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig webServerIpv4ReservedRange. */ + public webServerIpv4ReservedRange: string; + + /** + * Creates a new PrivateEnvironmentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateEnvironmentConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; + + /** + * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. + * @param message PrivateEnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. + * @param message PrivateEnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; + + /** + * Verifies a PrivateEnvironmentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateEnvironmentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; + + /** + * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. + * @param message PrivateEnvironmentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateEnvironmentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Environment. */ + interface IEnvironment { + + /** Environment name */ + name?: (string|null); + + /** Environment config */ + config?: (google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null); + + /** Environment uuid */ + uuid?: (string|null); + + /** Environment state */ + state?: (google.cloud.orchestration.airflow.service.v1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1.Environment.State|null); + + /** Environment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents an Environment. */ + class Environment implements IEnvironment { + + /** + * Constructs a new Environment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironment); + + /** Environment name. */ + public name: string; + + /** Environment config. */ + public config?: (google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null); + + /** Environment uuid. */ + public uuid: string; + + /** Environment state. */ + public state: (google.cloud.orchestration.airflow.service.v1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1.Environment.State); + + /** Environment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Environment instance using the specified properties. + * @param [properties] Properties to set + * @returns Environment instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironment): google.cloud.orchestration.airflow.service.v1.Environment; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.Environment; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.Environment; + + /** + * Verifies an Environment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Environment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.Environment; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @param message Environment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Environment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Environment { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + RUNNING = 2, + UPDATING = 3, + DELETING = 4, + ERROR = 5 + } + } + + /** Properties of a CheckUpgradeResponse. */ + interface ICheckUpgradeResponse { + + /** CheckUpgradeResponse buildLogUri */ + buildLogUri?: (string|null); + + /** CheckUpgradeResponse containsPypiModulesConflict */ + containsPypiModulesConflict?: (google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|null); + + /** CheckUpgradeResponse pypiConflictBuildLogExtract */ + pypiConflictBuildLogExtract?: (string|null); + + /** CheckUpgradeResponse imageVersion */ + imageVersion?: (string|null); + + /** CheckUpgradeResponse pypiDependencies */ + pypiDependencies?: ({ [k: string]: string }|null); + } + + /** Represents a CheckUpgradeResponse. */ + class CheckUpgradeResponse implements ICheckUpgradeResponse { + + /** + * Constructs a new CheckUpgradeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse); + + /** CheckUpgradeResponse buildLogUri. */ + public buildLogUri: string; + + /** CheckUpgradeResponse containsPypiModulesConflict. */ + public containsPypiModulesConflict: (google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult); + + /** CheckUpgradeResponse pypiConflictBuildLogExtract. */ + public pypiConflictBuildLogExtract: string; + + /** CheckUpgradeResponse imageVersion. */ + public imageVersion: string; + + /** CheckUpgradeResponse pypiDependencies. */ + public pypiDependencies: { [k: string]: string }; + + /** + * Creates a new CheckUpgradeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckUpgradeResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; + + /** + * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. + * @param message CheckUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. + * @param message CheckUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; + + /** + * Verifies a CheckUpgradeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckUpgradeResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; + + /** + * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. + * @param message CheckUpgradeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckUpgradeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CheckUpgradeResponse { + + /** ConflictResult enum. */ + enum ConflictResult { + CONFLICT_RESULT_UNSPECIFIED = 0, + CONFLICT = 1, + NO_CONFLICT = 2 + } + } + + /** Represents an ImageVersions */ + class ImageVersions extends $protobuf.rpc.Service { + + /** + * Constructs a new ImageVersions 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 ImageVersions 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): ImageVersions; + + /** + * Calls ListImageVersions. + * @param request ListImageVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListImageVersionsResponse + */ + public listImageVersions(request: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, callback: google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersionsCallback): void; + + /** + * Calls ListImageVersions. + * @param request ListImageVersionsRequest message or plain object + * @returns Promise + */ + public listImageVersions(request: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest): Promise; + } + + namespace ImageVersions { + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions#listImageVersions}. + * @param error Error, if any + * @param [response] ListImageVersionsResponse + */ + type ListImageVersionsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) => void; + } + + /** Properties of a ListImageVersionsRequest. */ + interface IListImageVersionsRequest { + + /** ListImageVersionsRequest parent */ + parent?: (string|null); + + /** ListImageVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListImageVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListImageVersionsRequest includePastReleases */ + includePastReleases?: (boolean|null); + } + + /** Represents a ListImageVersionsRequest. */ + class ListImageVersionsRequest implements IListImageVersionsRequest { + + /** + * Constructs a new ListImageVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest); + + /** ListImageVersionsRequest parent. */ + public parent: string; + + /** ListImageVersionsRequest pageSize. */ + public pageSize: number; + + /** ListImageVersionsRequest pageToken. */ + public pageToken: string; + + /** ListImageVersionsRequest includePastReleases. */ + public includePastReleases: boolean; + + /** + * Creates a new ListImageVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListImageVersionsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; + + /** + * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. + * @param message ListImageVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. + * @param message ListImageVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; + + /** + * Verifies a ListImageVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListImageVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; + + /** + * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. + * @param message ListImageVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListImageVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListImageVersionsResponse. */ + interface IListImageVersionsResponse { + + /** ListImageVersionsResponse imageVersions */ + imageVersions?: (google.cloud.orchestration.airflow.service.v1.IImageVersion[]|null); + + /** ListImageVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListImageVersionsResponse. */ + class ListImageVersionsResponse implements IListImageVersionsResponse { + + /** + * Constructs a new ListImageVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse); + + /** ListImageVersionsResponse imageVersions. */ + public imageVersions: google.cloud.orchestration.airflow.service.v1.IImageVersion[]; + + /** ListImageVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListImageVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListImageVersionsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; + + /** + * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. + * @param message ListImageVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. + * @param message ListImageVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; + + /** + * Verifies a ListImageVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListImageVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; + + /** + * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. + * @param message ListImageVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListImageVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ImageVersion. */ + interface IImageVersion { + + /** ImageVersion imageVersionId */ + imageVersionId?: (string|null); + + /** ImageVersion isDefault */ + isDefault?: (boolean|null); + + /** ImageVersion supportedPythonVersions */ + supportedPythonVersions?: (string[]|null); + + /** ImageVersion releaseDate */ + releaseDate?: (google.type.IDate|null); + + /** ImageVersion creationDisabled */ + creationDisabled?: (boolean|null); + + /** ImageVersion upgradeDisabled */ + upgradeDisabled?: (boolean|null); + } + + /** Represents an ImageVersion. */ + class ImageVersion implements IImageVersion { + + /** + * Constructs a new ImageVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IImageVersion); + + /** ImageVersion imageVersionId. */ + public imageVersionId: string; + + /** ImageVersion isDefault. */ + public isDefault: boolean; + + /** ImageVersion supportedPythonVersions. */ + public supportedPythonVersions: string[]; + + /** ImageVersion releaseDate. */ + public releaseDate?: (google.type.IDate|null); + + /** ImageVersion creationDisabled. */ + public creationDisabled: boolean; + + /** ImageVersion upgradeDisabled. */ + public upgradeDisabled: boolean; + + /** + * Creates a new ImageVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageVersion instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IImageVersion): google.cloud.orchestration.airflow.service.v1.ImageVersion; + + /** + * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. + * @param message ImageVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. + * @param message ImageVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ImageVersion; + + /** + * Decodes an ImageVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ImageVersion; + + /** + * Verifies an ImageVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ImageVersion; + + /** + * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. + * @param message ImageVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ImageVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata state */ + state?: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|null); + + /** OperationMetadata operationType */ + operationType?: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|null); + + /** OperationMetadata resource */ + resource?: (string|null); + + /** OperationMetadata resourceUuid */ + resourceUuid?: (string|null); + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IOperationMetadata); + + /** OperationMetadata state. */ + public state: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.State); + + /** OperationMetadata operationType. */ + public operationType: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type); + + /** OperationMetadata resource. */ + public resource: string; + + /** OperationMetadata resourceUuid. */ + public resourceUuid: string; + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IOperationMetadata): google.cloud.orchestration.airflow.service.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OperationMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + SUCCEEDED = 3, + SUCCESSFUL = 3, + FAILED = 4 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CREATE = 1, + DELETE = 2, + UPDATE = 3, + CHECK = 4 + } + } + } + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** 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 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.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironmentCallback): void; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest): 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.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironmentCallback): void; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest): Promise; + + /** + * 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.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironmentsCallback): void; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise + */ + public listEnvironments(request: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest): 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.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironmentCallback): void; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise + */ + public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest): Promise; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironmentCallback): void; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise + */ + public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest): Promise; + + /** + * Calls RestartWebServer. + * @param request RestartWebServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restartWebServer(request: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServerCallback): void; + + /** + * Calls RestartWebServer. + * @param request RestartWebServerRequest message or plain object + * @returns Promise + */ + public restartWebServer(request: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest): Promise; + + /** + * Calls CheckUpgrade. + * @param request CheckUpgradeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgradeCallback): void; + + /** + * Calls CheckUpgrade. + * @param request CheckUpgradeRequest message or plain object + * @returns Promise + */ + public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest): Promise; + } + + namespace Environments { + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#createEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#getEnvironment}. + * @param error Error, if any + * @param [response] Environment + */ + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.Environment) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#listEnvironments}. + * @param error Error, if any + * @param [response] ListEnvironmentsResponse + */ + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#updateEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#deleteEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#restartWebServer}. + * @param error Error, if any + * @param [response] Operation + */ + type RestartWebServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#checkUpgrade}. + * @param error Error, if any + * @param [response] Operation + */ + type CheckUpgradeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { + + /** CreateEnvironmentRequest parent */ + parent?: (string|null); + + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); + } + + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { + + /** + * Constructs a new CreateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest); + + /** CreateEnvironmentRequest parent. */ + public parent: string; + + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; + + /** + * Verifies a CreateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @param message CreateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { + + /** GetEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { + + /** + * Constructs a new GetEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest); + + /** GetEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; + + /** + * Verifies a GetEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { + + /** ListEnvironmentsRequest parent */ + parent?: (string|null); + + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { + + /** + * Constructs a new ListEnvironmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest); + + /** ListEnvironmentsRequest parent. */ + public parent: string; + + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; + + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; + + /** + * Verifies a ListEnvironmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @param message ListEnvironmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { + + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[]|null); + + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { + + /** + * Constructs a new ListEnvironmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse); + + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[]; + + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; + + /** + * Verifies a ListEnvironmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @param message ListEnvironmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { + + /** DeleteEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { + + /** + * Constructs a new DeleteEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest); + + /** DeleteEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { + + /** UpdateEnvironmentRequest name */ + name?: (string|null); + + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); + + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { + + /** + * Constructs a new UpdateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest); + + /** UpdateEnvironmentRequest name. */ + public name: string; + + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); + + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RestartWebServerRequest. */ + interface IRestartWebServerRequest { + + /** RestartWebServerRequest name */ + name?: (string|null); + } + + /** Represents a RestartWebServerRequest. */ + class RestartWebServerRequest implements IRestartWebServerRequest { + + /** + * Constructs a new RestartWebServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest); + + /** RestartWebServerRequest name. */ + public name: string; + + /** + * Creates a new RestartWebServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestartWebServerRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; + + /** + * Encodes the specified RestartWebServerRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. + * @param message RestartWebServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestartWebServerRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. + * @param message RestartWebServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestartWebServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestartWebServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; + + /** + * Decodes a RestartWebServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestartWebServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; + + /** + * Verifies a RestartWebServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestartWebServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestartWebServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; + + /** + * Creates a plain object from a RestartWebServerRequest message. Also converts values to other types if specified. + * @param message RestartWebServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestartWebServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnvironmentConfig. */ + interface IEnvironmentConfig { + + /** EnvironmentConfig gkeCluster */ + gkeCluster?: (string|null); + + /** EnvironmentConfig dagGcsPrefix */ + dagGcsPrefix?: (string|null); + + /** EnvironmentConfig nodeCount */ + nodeCount?: (number|null); + + /** EnvironmentConfig softwareConfig */ + softwareConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null); + + /** EnvironmentConfig nodeConfig */ + nodeConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null); + + /** EnvironmentConfig privateEnvironmentConfig */ + privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null); + + /** EnvironmentConfig webServerNetworkAccessControl */ + webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null); + + /** EnvironmentConfig databaseConfig */ + databaseConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null); + + /** EnvironmentConfig webServerConfig */ + webServerConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null); + + /** EnvironmentConfig airflowUri */ + airflowUri?: (string|null); + + /** EnvironmentConfig encryptionConfig */ + encryptionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null); + + /** EnvironmentConfig maintenanceWindow */ + maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null); + + /** EnvironmentConfig workloadsConfig */ + workloadsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null); + + /** EnvironmentConfig environmentSize */ + environmentSize?: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|null); + } + + /** Represents an EnvironmentConfig. */ + class EnvironmentConfig implements IEnvironmentConfig { + + /** + * Constructs a new EnvironmentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig); + + /** EnvironmentConfig gkeCluster. */ + public gkeCluster: string; + + /** EnvironmentConfig dagGcsPrefix. */ + public dagGcsPrefix: string; + + /** EnvironmentConfig nodeCount. */ + public nodeCount: number; + + /** EnvironmentConfig softwareConfig. */ + public softwareConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null); + + /** EnvironmentConfig nodeConfig. */ + public nodeConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null); + + /** EnvironmentConfig privateEnvironmentConfig. */ + public privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null); + + /** EnvironmentConfig webServerNetworkAccessControl. */ + public webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null); + + /** EnvironmentConfig databaseConfig. */ + public databaseConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null); + + /** EnvironmentConfig webServerConfig. */ + public webServerConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null); + + /** EnvironmentConfig airflowUri. */ + public airflowUri: string; + + /** EnvironmentConfig encryptionConfig. */ + public encryptionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null); + + /** EnvironmentConfig maintenanceWindow. */ + public maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null); + + /** EnvironmentConfig workloadsConfig. */ + public workloadsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null); + + /** EnvironmentConfig environmentSize. */ + public environmentSize: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize); + + /** + * Creates a new EnvironmentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EnvironmentConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; + + /** + * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. + * @param message EnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. + * @param message EnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; + + /** + * Verifies an EnvironmentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnvironmentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; + + /** + * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. + * @param message EnvironmentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnvironmentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnvironmentConfig { + + /** EnvironmentSize enum. */ + enum EnvironmentSize { + ENVIRONMENT_SIZE_UNSPECIFIED = 0, + ENVIRONMENT_SIZE_SMALL = 1, + ENVIRONMENT_SIZE_MEDIUM = 2, + ENVIRONMENT_SIZE_LARGE = 3 + } + } + + /** Properties of a WebServerNetworkAccessControl. */ + interface IWebServerNetworkAccessControl { + + /** WebServerNetworkAccessControl allowedIpRanges */ + allowedIpRanges?: (google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange[]|null); + } + + /** Represents a WebServerNetworkAccessControl. */ + class WebServerNetworkAccessControl implements IWebServerNetworkAccessControl { + + /** + * Constructs a new WebServerNetworkAccessControl. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl); + + /** WebServerNetworkAccessControl allowedIpRanges. */ + public allowedIpRanges: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange[]; + + /** + * Creates a new WebServerNetworkAccessControl instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerNetworkAccessControl instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; + + /** + * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. + * @param message WebServerNetworkAccessControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. + * @param message WebServerNetworkAccessControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; + + /** + * Verifies a WebServerNetworkAccessControl message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerNetworkAccessControl + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; + + /** + * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. + * @param message WebServerNetworkAccessControl + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerNetworkAccessControl to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WebServerNetworkAccessControl { + + /** Properties of an AllowedIpRange. */ + interface IAllowedIpRange { + + /** AllowedIpRange value */ + value?: (string|null); + + /** AllowedIpRange description */ + description?: (string|null); + } + + /** Represents an AllowedIpRange. */ + class AllowedIpRange implements IAllowedIpRange { + + /** + * Constructs a new AllowedIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange); + + /** AllowedIpRange value. */ + public value: string; + + /** AllowedIpRange description. */ + public description: string; + + /** + * Creates a new AllowedIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedIpRange instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @param message AllowedIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @param message AllowedIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Verifies an AllowedIpRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllowedIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. + * @param message AllowedIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SoftwareConfig. */ + interface ISoftwareConfig { + + /** SoftwareConfig imageVersion */ + imageVersion?: (string|null); + + /** SoftwareConfig airflowConfigOverrides */ + airflowConfigOverrides?: ({ [k: string]: string }|null); + + /** SoftwareConfig pypiPackages */ + pypiPackages?: ({ [k: string]: string }|null); + + /** SoftwareConfig envVariables */ + envVariables?: ({ [k: string]: string }|null); + + /** SoftwareConfig pythonVersion */ + pythonVersion?: (string|null); + } + + /** Represents a SoftwareConfig. */ + class SoftwareConfig implements ISoftwareConfig { + + /** + * Constructs a new SoftwareConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig); + + /** SoftwareConfig imageVersion. */ + public imageVersion: string; + + /** SoftwareConfig airflowConfigOverrides. */ + public airflowConfigOverrides: { [k: string]: string }; + + /** SoftwareConfig pypiPackages. */ + public pypiPackages: { [k: string]: string }; + + /** SoftwareConfig envVariables. */ + public envVariables: { [k: string]: string }; + + /** SoftwareConfig pythonVersion. */ + public pythonVersion: string; + + /** + * Creates a new SoftwareConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SoftwareConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; + + /** + * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. + * @param message SoftwareConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. + * @param message SoftwareConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; + + /** + * Verifies a SoftwareConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoftwareConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; + + /** + * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. + * @param message SoftwareConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoftwareConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a IPAllocationPolicy. */ + interface IIPAllocationPolicy { + + /** IPAllocationPolicy useIpAliases */ + useIpAliases?: (boolean|null); + + /** IPAllocationPolicy clusterSecondaryRangeName */ + clusterSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy servicesSecondaryRangeName */ + servicesSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy clusterIpv4CidrBlock */ + clusterIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesIpv4CidrBlock */ + servicesIpv4CidrBlock?: (string|null); + } + + /** Represents a IPAllocationPolicy. */ + class IPAllocationPolicy implements IIPAllocationPolicy { + + /** + * Constructs a new IPAllocationPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy); + + /** IPAllocationPolicy useIpAliases. */ + public useIpAliases: boolean; + + /** IPAllocationPolicy clusterSecondaryRangeName. */ + public clusterSecondaryRangeName: string; + + /** IPAllocationPolicy servicesSecondaryRangeName. */ + public servicesSecondaryRangeName: string; + + /** IPAllocationPolicy clusterIpv4CidrBlock. */ + public clusterIpv4CidrBlock: string; + + /** IPAllocationPolicy servicesIpv4CidrBlock. */ + public servicesIpv4CidrBlock: string; + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns IPAllocationPolicy instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; + + /** + * Verifies a IPAllocationPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IPAllocationPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @param message IPAllocationPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NodeConfig. */ + interface INodeConfig { + + /** NodeConfig location */ + location?: (string|null); + + /** NodeConfig machineType */ + machineType?: (string|null); + + /** NodeConfig network */ + network?: (string|null); + + /** NodeConfig subnetwork */ + subnetwork?: (string|null); + + /** NodeConfig diskSizeGb */ + diskSizeGb?: (number|null); + + /** NodeConfig oauthScopes */ + oauthScopes?: (string[]|null); + + /** NodeConfig serviceAccount */ + serviceAccount?: (string|null); + + /** NodeConfig tags */ + tags?: (string[]|null); + + /** NodeConfig ipAllocationPolicy */ + ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null); + + /** NodeConfig maxPodsPerNode */ + maxPodsPerNode?: (number|null); + } + + /** Represents a NodeConfig. */ + class NodeConfig implements INodeConfig { + + /** + * Constructs a new NodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig); + + /** NodeConfig location. */ + public location: string; + + /** NodeConfig machineType. */ + public machineType: string; + + /** NodeConfig network. */ + public network: string; + + /** NodeConfig subnetwork. */ + public subnetwork: string; + + /** NodeConfig diskSizeGb. */ + public diskSizeGb: number; + + /** NodeConfig oauthScopes. */ + public oauthScopes: string[]; + + /** NodeConfig serviceAccount. */ + public serviceAccount: string; + + /** NodeConfig tags. */ + public tags: string[]; + + /** NodeConfig ipAllocationPolicy. */ + public ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null); + + /** NodeConfig maxPodsPerNode. */ + public maxPodsPerNode: number; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; + + /** + * Verifies a NodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @param message NodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PrivateClusterConfig. */ + interface IPrivateClusterConfig { + + /** PrivateClusterConfig enablePrivateEndpoint */ + enablePrivateEndpoint?: (boolean|null); + + /** PrivateClusterConfig masterIpv4CidrBlock */ + masterIpv4CidrBlock?: (string|null); + + /** PrivateClusterConfig masterIpv4ReservedRange */ + masterIpv4ReservedRange?: (string|null); + } + + /** Represents a PrivateClusterConfig. */ + class PrivateClusterConfig implements IPrivateClusterConfig { + + /** + * Constructs a new PrivateClusterConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig); + + /** PrivateClusterConfig enablePrivateEndpoint. */ + public enablePrivateEndpoint: boolean; + + /** PrivateClusterConfig masterIpv4CidrBlock. */ + public masterIpv4CidrBlock: string; + + /** PrivateClusterConfig masterIpv4ReservedRange. */ + public masterIpv4ReservedRange: string; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateClusterConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; + + /** + * Verifies a PrivateClusterConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateClusterConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @param message PrivateClusterConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PrivateEnvironmentConfig. */ + interface IPrivateEnvironmentConfig { + + /** PrivateEnvironmentConfig enablePrivateEnvironment */ + enablePrivateEnvironment?: (boolean|null); + + /** PrivateEnvironmentConfig privateClusterConfig */ + privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null); + + /** PrivateEnvironmentConfig webServerIpv4CidrBlock */ + webServerIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock */ + cloudSqlIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig webServerIpv4ReservedRange */ + webServerIpv4ReservedRange?: (string|null); + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock */ + cloudComposerNetworkIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange */ + cloudComposerNetworkIpv4ReservedRange?: (string|null); + } + + /** Represents a PrivateEnvironmentConfig. */ + class PrivateEnvironmentConfig implements IPrivateEnvironmentConfig { + + /** + * Constructs a new PrivateEnvironmentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig); + + /** PrivateEnvironmentConfig enablePrivateEnvironment. */ + public enablePrivateEnvironment: boolean; + + /** PrivateEnvironmentConfig privateClusterConfig. */ + public privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null); + + /** PrivateEnvironmentConfig webServerIpv4CidrBlock. */ + public webServerIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. */ + public cloudSqlIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig webServerIpv4ReservedRange. */ + public webServerIpv4ReservedRange: string; + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. */ + public cloudComposerNetworkIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. */ + public cloudComposerNetworkIpv4ReservedRange: string; + + /** + * Creates a new PrivateEnvironmentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateEnvironmentConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; + + /** + * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. + * @param message PrivateEnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. + * @param message PrivateEnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; + + /** + * Verifies a PrivateEnvironmentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateEnvironmentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; + + /** + * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. + * @param message PrivateEnvironmentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateEnvironmentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DatabaseConfig. */ + interface IDatabaseConfig { + + /** DatabaseConfig machineType */ + machineType?: (string|null); + } + + /** Represents a DatabaseConfig. */ + class DatabaseConfig implements IDatabaseConfig { + + /** + * Constructs a new DatabaseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig); + + /** DatabaseConfig machineType. */ + public machineType: string; + + /** + * Creates a new DatabaseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; + + /** + * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. + * @param message DatabaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. + * @param message DatabaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; + + /** + * Verifies a DatabaseConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; + + /** + * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. + * @param message DatabaseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WebServerConfig. */ + interface IWebServerConfig { + + /** WebServerConfig machineType */ + machineType?: (string|null); + } + + /** Represents a WebServerConfig. */ + class WebServerConfig implements IWebServerConfig { + + /** + * Constructs a new WebServerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig); + + /** WebServerConfig machineType. */ + public machineType: string; + + /** + * Creates a new WebServerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; + + /** + * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. + * @param message WebServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. + * @param message WebServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; + + /** + * Verifies a WebServerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; + + /** + * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. + * @param message WebServerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; + + /** + * Verifies an EncryptionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MaintenanceWindow. */ + interface IMaintenanceWindow { + + /** MaintenanceWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow recurrence */ + recurrence?: (string|null); + } + + /** Represents a MaintenanceWindow. */ + class MaintenanceWindow implements IMaintenanceWindow { + + /** + * Constructs a new MaintenanceWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow); + + /** MaintenanceWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow recurrence. */ + public recurrence: string; + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenanceWindow instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; + + /** + * Verifies a MaintenanceWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenanceWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @param message MaintenanceWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenanceWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WorkloadsConfig. */ + interface IWorkloadsConfig { + + /** WorkloadsConfig scheduler */ + scheduler?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null); + + /** WorkloadsConfig webServer */ + webServer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null); + + /** WorkloadsConfig worker */ + worker?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null); + } + + /** Represents a WorkloadsConfig. */ + class WorkloadsConfig implements IWorkloadsConfig { + + /** + * Constructs a new WorkloadsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig); + + /** WorkloadsConfig scheduler. */ + public scheduler?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null); + + /** WorkloadsConfig webServer. */ + public webServer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null); + + /** WorkloadsConfig worker. */ + public worker?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null); + + /** + * Creates a new WorkloadsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadsConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; + + /** + * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. + * @param message WorkloadsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. + * @param message WorkloadsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; + + /** + * Verifies a WorkloadsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; + + /** + * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. + * @param message WorkloadsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WorkloadsConfig { + + /** Properties of a SchedulerResource. */ + interface ISchedulerResource { + + /** SchedulerResource cpu */ + cpu?: (number|null); + + /** SchedulerResource memoryGb */ + memoryGb?: (number|null); + + /** SchedulerResource storageGb */ + storageGb?: (number|null); + + /** SchedulerResource count */ + count?: (number|null); + } + + /** Represents a SchedulerResource. */ + class SchedulerResource implements ISchedulerResource { + + /** + * Constructs a new SchedulerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource); + + /** SchedulerResource cpu. */ + public cpu: number; + + /** SchedulerResource memoryGb. */ + public memoryGb: number; + + /** SchedulerResource storageGb. */ + public storageGb: number; + + /** SchedulerResource count. */ + public count: number; + + /** + * Creates a new SchedulerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns SchedulerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; + + /** + * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @param message SchedulerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @param message SchedulerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; + + /** + * Verifies a SchedulerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchedulerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; + + /** + * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. + * @param message SchedulerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchedulerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WebServerResource. */ + interface IWebServerResource { + + /** WebServerResource cpu */ + cpu?: (number|null); + + /** WebServerResource memoryGb */ + memoryGb?: (number|null); + + /** WebServerResource storageGb */ + storageGb?: (number|null); + } + + /** Represents a WebServerResource. */ + class WebServerResource implements IWebServerResource { + + /** + * Constructs a new WebServerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource); + + /** WebServerResource cpu. */ + public cpu: number; + + /** WebServerResource memoryGb. */ + public memoryGb: number; + + /** WebServerResource storageGb. */ + public storageGb: number; + + /** + * Creates a new WebServerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; + + /** + * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @param message WebServerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @param message WebServerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; + + /** + * Decodes a WebServerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; + + /** + * Verifies a WebServerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; + + /** + * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. + * @param message WebServerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WorkerResource. */ + interface IWorkerResource { + + /** WorkerResource cpu */ + cpu?: (number|null); + + /** WorkerResource memoryGb */ + memoryGb?: (number|null); + + /** WorkerResource storageGb */ + storageGb?: (number|null); + + /** WorkerResource minCount */ + minCount?: (number|null); + + /** WorkerResource maxCount */ + maxCount?: (number|null); + } + + /** Represents a WorkerResource. */ + class WorkerResource implements IWorkerResource { + + /** + * Constructs a new WorkerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource); + + /** WorkerResource cpu. */ + public cpu: number; + + /** WorkerResource memoryGb. */ + public memoryGb: number; + + /** WorkerResource storageGb. */ + public storageGb: number; + + /** WorkerResource minCount. */ + public minCount: number; + + /** WorkerResource maxCount. */ + public maxCount: number; + + /** + * Creates a new WorkerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; + + /** + * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @param message WorkerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @param message WorkerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; + + /** + * Decodes a WorkerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; + + /** + * Verifies a WorkerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; + + /** + * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. + * @param message WorkerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Environment. */ + interface IEnvironment { + + /** Environment name */ + name?: (string|null); + + /** Environment config */ + config?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null); + + /** Environment uuid */ + uuid?: (string|null); + + /** Environment state */ + state?: (google.cloud.orchestration.airflow.service.v1beta1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.Environment.State|null); + + /** Environment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents an Environment. */ + class Environment implements IEnvironment { + + /** + * Constructs a new Environment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment); + + /** Environment name. */ + public name: string; + + /** Environment config. */ + public config?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null); + + /** Environment uuid. */ + public uuid: string; + + /** Environment state. */ + public state: (google.cloud.orchestration.airflow.service.v1beta1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.Environment.State); + + /** Environment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Environment instance using the specified properties. + * @param [properties] Properties to set + * @returns Environment instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment): google.cloud.orchestration.airflow.service.v1beta1.Environment; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.Environment; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.Environment; + + /** + * Verifies an Environment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Environment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.Environment; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @param message Environment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Environment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Environment { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + RUNNING = 2, + UPDATING = 3, + DELETING = 4, + ERROR = 5 + } + } + + /** Properties of a CheckUpgradeRequest. */ + interface ICheckUpgradeRequest { + + /** CheckUpgradeRequest environment */ + environment?: (string|null); + + /** CheckUpgradeRequest imageVersion */ + imageVersion?: (string|null); + } + + /** Represents a CheckUpgradeRequest. */ + class CheckUpgradeRequest implements ICheckUpgradeRequest { + + /** + * Constructs a new CheckUpgradeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest); + + /** CheckUpgradeRequest environment. */ + public environment: string; + + /** CheckUpgradeRequest imageVersion. */ + public imageVersion: string; + + /** + * Creates a new CheckUpgradeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckUpgradeRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; + + /** + * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. + * @param message CheckUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. + * @param message CheckUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; + + /** + * Verifies a CheckUpgradeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckUpgradeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; + + /** + * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. + * @param message CheckUpgradeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckUpgradeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CheckUpgradeResponse. */ + interface ICheckUpgradeResponse { + + /** CheckUpgradeResponse buildLogUri */ + buildLogUri?: (string|null); + + /** CheckUpgradeResponse containsPypiModulesConflict */ + containsPypiModulesConflict?: (google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|null); + + /** CheckUpgradeResponse pypiConflictBuildLogExtract */ + pypiConflictBuildLogExtract?: (string|null); + + /** CheckUpgradeResponse imageVersion */ + imageVersion?: (string|null); + + /** CheckUpgradeResponse pypiDependencies */ + pypiDependencies?: ({ [k: string]: string }|null); + } + + /** Represents a CheckUpgradeResponse. */ + class CheckUpgradeResponse implements ICheckUpgradeResponse { + + /** + * Constructs a new CheckUpgradeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse); + + /** CheckUpgradeResponse buildLogUri. */ + public buildLogUri: string; + + /** CheckUpgradeResponse containsPypiModulesConflict. */ + public containsPypiModulesConflict: (google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult); + + /** CheckUpgradeResponse pypiConflictBuildLogExtract. */ + public pypiConflictBuildLogExtract: string; + + /** CheckUpgradeResponse imageVersion. */ + public imageVersion: string; + + /** CheckUpgradeResponse pypiDependencies. */ + public pypiDependencies: { [k: string]: string }; + + /** + * Creates a new CheckUpgradeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckUpgradeResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; + + /** + * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. + * @param message CheckUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. + * @param message CheckUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; + + /** + * Verifies a CheckUpgradeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckUpgradeResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; + + /** + * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. + * @param message CheckUpgradeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckUpgradeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CheckUpgradeResponse { + + /** ConflictResult enum. */ + enum ConflictResult { + CONFLICT_RESULT_UNSPECIFIED = 0, + CONFLICT = 1, + NO_CONFLICT = 2 + } + } + + /** Represents an ImageVersions */ + class ImageVersions extends $protobuf.rpc.Service { + + /** + * Constructs a new ImageVersions 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 ImageVersions 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): ImageVersions; + + /** + * Calls ListImageVersions. + * @param request ListImageVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListImageVersionsResponse + */ + public listImageVersions(request: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersionsCallback): void; + + /** + * Calls ListImageVersions. + * @param request ListImageVersionsRequest message or plain object + * @returns Promise + */ + public listImageVersions(request: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest): Promise; + } + + namespace ImageVersions { + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions#listImageVersions}. + * @param error Error, if any + * @param [response] ListImageVersionsResponse + */ + type ListImageVersionsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) => void; + } + + /** Properties of a ListImageVersionsRequest. */ + interface IListImageVersionsRequest { + + /** ListImageVersionsRequest parent */ + parent?: (string|null); + + /** ListImageVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListImageVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListImageVersionsRequest includePastReleases */ + includePastReleases?: (boolean|null); + } + + /** Represents a ListImageVersionsRequest. */ + class ListImageVersionsRequest implements IListImageVersionsRequest { + + /** + * Constructs a new ListImageVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest); + + /** ListImageVersionsRequest parent. */ + public parent: string; + + /** ListImageVersionsRequest pageSize. */ + public pageSize: number; + + /** ListImageVersionsRequest pageToken. */ + public pageToken: string; + + /** ListImageVersionsRequest includePastReleases. */ + public includePastReleases: boolean; + + /** + * Creates a new ListImageVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListImageVersionsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; + + /** + * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. + * @param message ListImageVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. + * @param message ListImageVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; + + /** + * Verifies a ListImageVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListImageVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; + + /** + * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. + * @param message ListImageVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListImageVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListImageVersionsResponse. */ + interface IListImageVersionsResponse { + + /** ListImageVersionsResponse imageVersions */ + imageVersions?: (google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[]|null); + + /** ListImageVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListImageVersionsResponse. */ + class ListImageVersionsResponse implements IListImageVersionsResponse { + + /** + * Constructs a new ListImageVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse); + + /** ListImageVersionsResponse imageVersions. */ + public imageVersions: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[]; + + /** ListImageVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListImageVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListImageVersionsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; + + /** + * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. + * @param message ListImageVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. + * @param message ListImageVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; + + /** + * Verifies a ListImageVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListImageVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; + + /** + * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. + * @param message ListImageVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListImageVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ImageVersion. */ + interface IImageVersion { + + /** ImageVersion imageVersionId */ + imageVersionId?: (string|null); + + /** ImageVersion isDefault */ + isDefault?: (boolean|null); + + /** ImageVersion supportedPythonVersions */ + supportedPythonVersions?: (string[]|null); + + /** ImageVersion releaseDate */ + releaseDate?: (google.type.IDate|null); + + /** ImageVersion creationDisabled */ + creationDisabled?: (boolean|null); + + /** ImageVersion upgradeDisabled */ + upgradeDisabled?: (boolean|null); + } + + /** Represents an ImageVersion. */ + class ImageVersion implements IImageVersion { + + /** + * Constructs a new ImageVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion); + + /** ImageVersion imageVersionId. */ + public imageVersionId: string; + + /** ImageVersion isDefault. */ + public isDefault: boolean; + + /** ImageVersion supportedPythonVersions. */ + public supportedPythonVersions: string[]; + + /** ImageVersion releaseDate. */ + public releaseDate?: (google.type.IDate|null); + + /** ImageVersion creationDisabled. */ + public creationDisabled: boolean; + + /** ImageVersion upgradeDisabled. */ + public upgradeDisabled: boolean; + + /** + * Creates a new ImageVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageVersion instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; + + /** + * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. + * @param message ImageVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. + * @param message ImageVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; + + /** + * Decodes an ImageVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; + + /** + * Verifies an ImageVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; + + /** + * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. + * @param message ImageVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ImageVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata state */ + state?: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|null); + + /** OperationMetadata operationType */ + operationType?: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|null); + + /** OperationMetadata resource */ + resource?: (string|null); + + /** OperationMetadata resourceUuid */ + resourceUuid?: (string|null); + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata); + + /** OperationMetadata state. */ + public state: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State); + + /** OperationMetadata operationType. */ + public operationType: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type); + + /** OperationMetadata resource. */ + public resource: string; + + /** OperationMetadata resourceUuid. */ + public resourceUuid: string; + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata): google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OperationMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + SUCCESSFUL = 3, + FAILED = 4 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CREATE = 1, + DELETE = 2, + UPDATE = 3, + CHECK = 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 }; + } + + /** 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 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js new file mode 100644 index 00000000000..3da0b77bdb7 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -0,0 +1,28978 @@ +// 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. + +/*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_orchestration_airflow_protos || ($protobuf.roots._google_cloud_orchestration_airflow_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.orchestration = (function() { + + /** + * Namespace orchestration. + * @memberof google.cloud + * @namespace + */ + var orchestration = {}; + + orchestration.airflow = (function() { + + /** + * Namespace airflow. + * @memberof google.cloud.orchestration + * @namespace + */ + var airflow = {}; + + airflow.service = (function() { + + /** + * Namespace service. + * @memberof google.cloud.orchestration.airflow + * @namespace + */ + var service = {}; + + service.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.orchestration.airflow.service + * @namespace + */ + var v1 = {}; + + v1.Environments = (function() { + + /** + * Constructs a new Environments service. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @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.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.Environments#createEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#getEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.GetEnvironmentRequest, $root.google.cloud.orchestration.airflow.service.v1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#listEnvironments}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.ListEnvironmentsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#updateEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#deleteEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Environments; + })(); + + v1.CreateEnvironmentRequest = (function() { + + /** + * Properties of a CreateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {google.cloud.orchestration.airflow.service.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + */ + + /** + * Constructs a new CreateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest=} [properties] Properties to set + */ + function CreateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.parent = ""; + + /** + * CreateEnvironmentRequest environment. + * @member {google.cloud.orchestration.airflow.service.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environment = null; + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + */ + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.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.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + return null; + }; + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + */ + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environment); + } + return message; + }; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.environment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environment, options); + return object; + }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateEnvironmentRequest; + })(); + + v1.GetEnvironmentRequest = (function() { + + /** + * Properties of a GetEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name + */ + + /** + * Constructs a new GetEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest=} [properties] Properties to set + */ + function GetEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @instance + */ + GetEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest instance + */ + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); + }; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encode = function encode(message, writer) { + 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 GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest(); + 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 GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnvironmentRequest.verify = function verify(message) { + if (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 GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest + */ + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEnvironmentRequest.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 GetEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetEnvironmentRequest; + })(); + + v1.ListEnvironmentsRequest = (function() { + + /** + * Properties of a ListEnvironmentsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + */ + + /** + * Constructs a new ListEnvironmentsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest=} [properties] Properties to set + */ + function ListEnvironmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.parent = ""; + + /** + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageSize = 0; + + /** + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + */ + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); + }; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.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 ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest(); + 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 ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsRequest.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 ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + */ + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest(); + 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 ListEnvironmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsRequest.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 ListEnvironmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListEnvironmentsRequest; + })(); + + v1.ListEnvironmentsResponse = (function() { + + /** + * Properties of a ListEnvironmentsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + */ + + /** + * Constructs a new ListEnvironmentsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse=} [properties] Properties to set + */ + function ListEnvironmentsResponse(properties) { + this.environments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + + /** + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + */ + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); + }; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environments[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 ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + */ + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListEnvironmentsResponse; + })(); + + v1.DeleteEnvironmentRequest = (function() { + + /** + * Properties of a DeleteEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name + */ + + /** + * Constructs a new DeleteEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + */ + function DeleteEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @instance + */ + DeleteEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + */ + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); + }; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encode = function encode(message, writer) { + 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 DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest(); + 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 DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEnvironmentRequest.verify = function verify(message) { + if (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 DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + */ + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteEnvironmentRequest; + })(); + + v1.UpdateEnvironmentRequest = (function() { + + /** + * Properties of an UpdateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IUpdateEnvironmentRequest + * @property {string|null} [name] UpdateEnvironmentRequest name + * @property {google.cloud.orchestration.airflow.service.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + */ + + /** + * Constructs a new UpdateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + */ + function UpdateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.name = ""; + + /** + * UpdateEnvironmentRequest environment. + * @member {google.cloud.orchestration.airflow.service.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.environment = null; + + /** + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + */ + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + 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 UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.name = reader.string(); + break; + case 1: + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environment); + if (error) + return "environment." + 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + */ + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = null; + object.name = ""; + object.updateMask = null; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateEnvironmentRequest; + })(); + + v1.EnvironmentConfig = (function() { + + /** + * Properties of an EnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IEnvironmentConfig + * @property {string|null} [gkeCluster] EnvironmentConfig gkeCluster + * @property {string|null} [dagGcsPrefix] EnvironmentConfig dagGcsPrefix + * @property {number|null} [nodeCount] EnvironmentConfig nodeCount + * @property {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null} [softwareConfig] EnvironmentConfig softwareConfig + * @property {google.cloud.orchestration.airflow.service.v1.INodeConfig|null} [nodeConfig] EnvironmentConfig nodeConfig + * @property {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null} [privateEnvironmentConfig] EnvironmentConfig privateEnvironmentConfig + * @property {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null} [webServerNetworkAccessControl] EnvironmentConfig webServerNetworkAccessControl + * @property {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null} [databaseConfig] EnvironmentConfig databaseConfig + * @property {google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null} [webServerConfig] EnvironmentConfig webServerConfig + * @property {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null} [encryptionConfig] EnvironmentConfig encryptionConfig + * @property {string|null} [airflowUri] EnvironmentConfig airflowUri + */ + + /** + * Constructs a new EnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an EnvironmentConfig. + * @implements IEnvironmentConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig=} [properties] Properties to set + */ + function EnvironmentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnvironmentConfig gkeCluster. + * @member {string} gkeCluster + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.gkeCluster = ""; + + /** + * EnvironmentConfig dagGcsPrefix. + * @member {string} dagGcsPrefix + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.dagGcsPrefix = ""; + + /** + * EnvironmentConfig nodeCount. + * @member {number} nodeCount + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.nodeCount = 0; + + /** + * EnvironmentConfig softwareConfig. + * @member {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null|undefined} softwareConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.softwareConfig = null; + + /** + * EnvironmentConfig nodeConfig. + * @member {google.cloud.orchestration.airflow.service.v1.INodeConfig|null|undefined} nodeConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.nodeConfig = null; + + /** + * EnvironmentConfig privateEnvironmentConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null|undefined} privateEnvironmentConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.privateEnvironmentConfig = null; + + /** + * EnvironmentConfig webServerNetworkAccessControl. + * @member {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null|undefined} webServerNetworkAccessControl + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.webServerNetworkAccessControl = null; + + /** + * EnvironmentConfig databaseConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null|undefined} databaseConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.databaseConfig = null; + + /** + * EnvironmentConfig webServerConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null|undefined} webServerConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.webServerConfig = null; + + /** + * EnvironmentConfig encryptionConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.encryptionConfig = null; + + /** + * EnvironmentConfig airflowUri. + * @member {string} airflowUri + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.airflowUri = ""; + + /** + * Creates a new EnvironmentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig instance + */ + EnvironmentConfig.create = function create(properties) { + return new EnvironmentConfig(properties); + }; + + /** + * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gkeCluster != null && Object.hasOwnProperty.call(message, "gkeCluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gkeCluster); + if (message.dagGcsPrefix != null && Object.hasOwnProperty.call(message, "dagGcsPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dagGcsPrefix); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nodeCount); + if (message.softwareConfig != null && Object.hasOwnProperty.call(message, "softwareConfig")) + $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.encode(message.softwareConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) + $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.airflowUri != null && Object.hasOwnProperty.call(message, "airflowUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.airflowUri); + if (message.privateEnvironmentConfig != null && Object.hasOwnProperty.call(message, "privateEnvironmentConfig")) + $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.encode(message.privateEnvironmentConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.webServerNetworkAccessControl != null && Object.hasOwnProperty.call(message, "webServerNetworkAccessControl")) + $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.encode(message.webServerNetworkAccessControl, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.databaseConfig != null && Object.hasOwnProperty.call(message, "databaseConfig")) + $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.encode(message.databaseConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.webServerConfig != null && Object.hasOwnProperty.call(message, "webServerConfig")) + $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.encode(message.webServerConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gkeCluster = reader.string(); + break; + case 2: + message.dagGcsPrefix = reader.string(); + break; + case 3: + message.nodeCount = reader.int32(); + break; + case 4: + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.decode(reader, reader.uint32()); + break; + case 5: + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.decode(reader, reader.uint32()); + break; + case 7: + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); + break; + case 8: + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); + break; + case 9: + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.decode(reader, reader.uint32()); + break; + case 10: + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.decode(reader, reader.uint32()); + break; + case 11: + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.decode(reader, reader.uint32()); + break; + case 6: + message.airflowUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnvironmentConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnvironmentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + if (!$util.isString(message.gkeCluster)) + return "gkeCluster: string expected"; + if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) + if (!$util.isString(message.dagGcsPrefix)) + return "dagGcsPrefix: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify(message.softwareConfig); + if (error) + return "softwareConfig." + error; + } + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.verify(message.nodeConfig); + if (error) + return "nodeConfig." + error; + } + if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify(message.privateEnvironmentConfig); + if (error) + return "privateEnvironmentConfig." + error; + } + if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify(message.webServerNetworkAccessControl); + if (error) + return "webServerNetworkAccessControl." + error; + } + if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify(message.databaseConfig); + if (error) + return "databaseConfig." + error; + } + if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify(message.webServerConfig); + if (error) + return "webServerConfig." + error; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) + if (!$util.isString(message.airflowUri)) + return "airflowUri: string expected"; + return null; + }; + + /** + * Creates an EnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig + */ + EnvironmentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig(); + if (object.gkeCluster != null) + message.gkeCluster = String(object.gkeCluster); + if (object.dagGcsPrefix != null) + message.dagGcsPrefix = String(object.dagGcsPrefix); + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.softwareConfig != null) { + if (typeof object.softwareConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.softwareConfig: object expected"); + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.fromObject(object.softwareConfig); + } + if (object.nodeConfig != null) { + if (typeof object.nodeConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.nodeConfig: object expected"); + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.fromObject(object.nodeConfig); + } + if (object.privateEnvironmentConfig != null) { + if (typeof object.privateEnvironmentConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.privateEnvironmentConfig: object expected"); + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.fromObject(object.privateEnvironmentConfig); + } + if (object.webServerNetworkAccessControl != null) { + if (typeof object.webServerNetworkAccessControl !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.webServerNetworkAccessControl: object expected"); + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.fromObject(object.webServerNetworkAccessControl); + } + if (object.databaseConfig != null) { + if (typeof object.databaseConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.databaseConfig: object expected"); + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.fromObject(object.databaseConfig); + } + if (object.webServerConfig != null) { + if (typeof object.webServerConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.webServerConfig: object expected"); + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.fromObject(object.webServerConfig); + } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.fromObject(object.encryptionConfig); + } + if (object.airflowUri != null) + message.airflowUri = String(object.airflowUri); + return message; + }; + + /** + * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} message EnvironmentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnvironmentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gkeCluster = ""; + object.dagGcsPrefix = ""; + object.nodeCount = 0; + object.softwareConfig = null; + object.nodeConfig = null; + object.airflowUri = ""; + object.privateEnvironmentConfig = null; + object.webServerNetworkAccessControl = null; + object.databaseConfig = null; + object.webServerConfig = null; + object.encryptionConfig = null; + } + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + object.gkeCluster = message.gkeCluster; + if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) + object.dagGcsPrefix = message.dagGcsPrefix; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) + object.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.toObject(message.softwareConfig, options); + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) + object.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.toObject(message.nodeConfig, options); + if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) + object.airflowUri = message.airflowUri; + if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) + object.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.toObject(message.privateEnvironmentConfig, options); + if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) + object.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.toObject(message.webServerNetworkAccessControl, options); + if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) + object.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.toObject(message.databaseConfig, options); + if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) + object.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.toObject(message.webServerConfig, options); + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.toObject(message.encryptionConfig, options); + return object; + }; + + /** + * Converts this EnvironmentConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + * @returns {Object.} JSON object + */ + EnvironmentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnvironmentConfig; + })(); + + v1.WebServerNetworkAccessControl = (function() { + + /** + * Properties of a WebServerNetworkAccessControl. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IWebServerNetworkAccessControl + * @property {Array.|null} [allowedIpRanges] WebServerNetworkAccessControl allowedIpRanges + */ + + /** + * Constructs a new WebServerNetworkAccessControl. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a WebServerNetworkAccessControl. + * @implements IWebServerNetworkAccessControl + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl=} [properties] Properties to set + */ + function WebServerNetworkAccessControl(properties) { + this.allowedIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerNetworkAccessControl allowedIpRanges. + * @member {Array.} allowedIpRanges + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @instance + */ + WebServerNetworkAccessControl.prototype.allowedIpRanges = $util.emptyArray; + + /** + * Creates a new WebServerNetworkAccessControl instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl instance + */ + WebServerNetworkAccessControl.create = function create(properties) { + return new WebServerNetworkAccessControl(properties); + }; + + /** + * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerNetworkAccessControl.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedIpRanges != null && message.allowedIpRanges.length) + for (var i = 0; i < message.allowedIpRanges.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.encode(message.allowedIpRanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerNetworkAccessControl.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerNetworkAccessControl.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedIpRanges && message.allowedIpRanges.length)) + message.allowedIpRanges = []; + message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerNetworkAccessControl.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerNetworkAccessControl message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerNetworkAccessControl.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedIpRanges != null && message.hasOwnProperty("allowedIpRanges")) { + if (!Array.isArray(message.allowedIpRanges)) + return "allowedIpRanges: array expected"; + for (var i = 0; i < message.allowedIpRanges.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify(message.allowedIpRanges[i]); + if (error) + return "allowedIpRanges." + error; + } + } + return null; + }; + + /** + * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + */ + WebServerNetworkAccessControl.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl(); + if (object.allowedIpRanges) { + if (!Array.isArray(object.allowedIpRanges)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.allowedIpRanges: array expected"); + message.allowedIpRanges = []; + for (var i = 0; i < object.allowedIpRanges.length; ++i) { + if (typeof object.allowedIpRanges[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.allowedIpRanges: object expected"); + message.allowedIpRanges[i] = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.fromObject(object.allowedIpRanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} message WebServerNetworkAccessControl + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerNetworkAccessControl.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedIpRanges = []; + if (message.allowedIpRanges && message.allowedIpRanges.length) { + object.allowedIpRanges = []; + for (var j = 0; j < message.allowedIpRanges.length; ++j) + object.allowedIpRanges[j] = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.toObject(message.allowedIpRanges[j], options); + } + return object; + }; + + /** + * Converts this WebServerNetworkAccessControl to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @instance + * @returns {Object.} JSON object + */ + WebServerNetworkAccessControl.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WebServerNetworkAccessControl.AllowedIpRange = (function() { + + /** + * Properties of an AllowedIpRange. + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @interface IAllowedIpRange + * @property {string|null} [value] AllowedIpRange value + * @property {string|null} [description] AllowedIpRange description + */ + + /** + * Constructs a new AllowedIpRange. + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @classdesc Represents an AllowedIpRange. + * @implements IAllowedIpRange + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set + */ + function AllowedIpRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllowedIpRange value. + * @member {string} value + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + */ + AllowedIpRange.prototype.value = ""; + + /** + * AllowedIpRange description. + * @member {string} description + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + */ + AllowedIpRange.prototype.description = ""; + + /** + * Creates a new AllowedIpRange instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange instance + */ + AllowedIpRange.create = function create(properties) { + return new AllowedIpRange(properties); + }; + + /** + * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedIpRange.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedIpRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedIpRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedIpRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedIpRange message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedIpRange.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an AllowedIpRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + */ + AllowedIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange(); + if (object.value != null) + message.value = String(object.value); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} message AllowedIpRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedIpRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.description = ""; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this AllowedIpRange to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + * @returns {Object.} JSON object + */ + AllowedIpRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AllowedIpRange; + })(); + + return WebServerNetworkAccessControl; + })(); + + v1.DatabaseConfig = (function() { + + /** + * Properties of a DatabaseConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDatabaseConfig + * @property {string|null} [machineType] DatabaseConfig machineType + */ + + /** + * Constructs a new DatabaseConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DatabaseConfig. + * @implements IDatabaseConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig=} [properties] Properties to set + */ + function DatabaseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @instance + */ + DatabaseConfig.prototype.machineType = ""; + + /** + * Creates a new DatabaseConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig instance + */ + DatabaseConfig.create = function create(properties) { + return new DatabaseConfig(properties); + }; + + /** + * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig} message DatabaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + return writer; + }; + + /** + * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig} message DatabaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.machineType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + return null; + }; + + /** + * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig + */ + DatabaseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + return message; + }; + + /** + * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} message DatabaseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.machineType = ""; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + return object; + }; + + /** + * Converts this DatabaseConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @instance + * @returns {Object.} JSON object + */ + DatabaseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DatabaseConfig; + })(); + + v1.WebServerConfig = (function() { + + /** + * Properties of a WebServerConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IWebServerConfig + * @property {string|null} [machineType] WebServerConfig machineType + */ + + /** + * Constructs a new WebServerConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a WebServerConfig. + * @implements IWebServerConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig=} [properties] Properties to set + */ + function WebServerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @instance + */ + WebServerConfig.prototype.machineType = ""; + + /** + * Creates a new WebServerConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig instance + */ + WebServerConfig.create = function create(properties) { + return new WebServerConfig(properties); + }; + + /** + * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig} message WebServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + return writer; + }; + + /** + * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig} message WebServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.machineType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + return null; + }; + + /** + * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig + */ + WebServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + return message; + }; + + /** + * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerConfig} message WebServerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.machineType = ""; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + return object; + }; + + /** + * Converts this WebServerConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @instance + * @returns {Object.} JSON object + */ + WebServerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WebServerConfig; + })(); + + v1.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kmsKeyName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EncryptionConfig; + })(); + + v1.SoftwareConfig = (function() { + + /** + * Properties of a SoftwareConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ISoftwareConfig + * @property {string|null} [imageVersion] SoftwareConfig imageVersion + * @property {Object.|null} [airflowConfigOverrides] SoftwareConfig airflowConfigOverrides + * @property {Object.|null} [pypiPackages] SoftwareConfig pypiPackages + * @property {Object.|null} [envVariables] SoftwareConfig envVariables + * @property {string|null} [pythonVersion] SoftwareConfig pythonVersion + */ + + /** + * Constructs a new SoftwareConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a SoftwareConfig. + * @implements ISoftwareConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig=} [properties] Properties to set + */ + function SoftwareConfig(properties) { + this.airflowConfigOverrides = {}; + this.pypiPackages = {}; + this.envVariables = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoftwareConfig imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.imageVersion = ""; + + /** + * SoftwareConfig airflowConfigOverrides. + * @member {Object.} airflowConfigOverrides + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.airflowConfigOverrides = $util.emptyObject; + + /** + * SoftwareConfig pypiPackages. + * @member {Object.} pypiPackages + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.pypiPackages = $util.emptyObject; + + /** + * SoftwareConfig envVariables. + * @member {Object.} envVariables + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.envVariables = $util.emptyObject; + + /** + * SoftwareConfig pythonVersion. + * @member {string} pythonVersion + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.pythonVersion = ""; + + /** + * Creates a new SoftwareConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig instance + */ + SoftwareConfig.create = function create(properties) { + return new SoftwareConfig(properties); + }; + + /** + * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig} message SoftwareConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); + if (message.airflowConfigOverrides != null && Object.hasOwnProperty.call(message, "airflowConfigOverrides")) + for (var keys = Object.keys(message.airflowConfigOverrides), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.airflowConfigOverrides[keys[i]]).ldelim(); + if (message.pypiPackages != null && Object.hasOwnProperty.call(message, "pypiPackages")) + for (var keys = Object.keys(message.pypiPackages), 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.pypiPackages[keys[i]]).ldelim(); + if (message.envVariables != null && Object.hasOwnProperty.call(message, "envVariables")) + for (var keys = Object.keys(message.envVariables), 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.envVariables[keys[i]]).ldelim(); + if (message.pythonVersion != null && Object.hasOwnProperty.call(message, "pythonVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pythonVersion); + return writer; + }; + + /** + * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig} message SoftwareConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.imageVersion = reader.string(); + break; + case 2: + if (message.airflowConfigOverrides === $util.emptyObject) + message.airflowConfigOverrides = {}; + 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.airflowConfigOverrides[key] = value; + break; + case 3: + if (message.pypiPackages === $util.emptyObject) + message.pypiPackages = {}; + 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.pypiPackages[key] = value; + break; + case 4: + if (message.envVariables === $util.emptyObject) + message.envVariables = {}; + 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.envVariables[key] = value; + break; + case 6: + message.pythonVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoftwareConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwareConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.airflowConfigOverrides != null && message.hasOwnProperty("airflowConfigOverrides")) { + if (!$util.isObject(message.airflowConfigOverrides)) + return "airflowConfigOverrides: object expected"; + var key = Object.keys(message.airflowConfigOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.airflowConfigOverrides[key[i]])) + return "airflowConfigOverrides: string{k:string} expected"; + } + if (message.pypiPackages != null && message.hasOwnProperty("pypiPackages")) { + if (!$util.isObject(message.pypiPackages)) + return "pypiPackages: object expected"; + var key = Object.keys(message.pypiPackages); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pypiPackages[key[i]])) + return "pypiPackages: string{k:string} expected"; + } + if (message.envVariables != null && message.hasOwnProperty("envVariables")) { + if (!$util.isObject(message.envVariables)) + return "envVariables: object expected"; + var key = Object.keys(message.envVariables); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.envVariables[key[i]])) + return "envVariables: string{k:string} expected"; + } + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + if (!$util.isString(message.pythonVersion)) + return "pythonVersion: string expected"; + return null; + }; + + /** + * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig + */ + SoftwareConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig(); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.airflowConfigOverrides) { + if (typeof object.airflowConfigOverrides !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.airflowConfigOverrides: object expected"); + message.airflowConfigOverrides = {}; + for (var keys = Object.keys(object.airflowConfigOverrides), i = 0; i < keys.length; ++i) + message.airflowConfigOverrides[keys[i]] = String(object.airflowConfigOverrides[keys[i]]); + } + if (object.pypiPackages) { + if (typeof object.pypiPackages !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.pypiPackages: object expected"); + message.pypiPackages = {}; + for (var keys = Object.keys(object.pypiPackages), i = 0; i < keys.length; ++i) + message.pypiPackages[keys[i]] = String(object.pypiPackages[keys[i]]); + } + if (object.envVariables) { + if (typeof object.envVariables !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.envVariables: object expected"); + message.envVariables = {}; + for (var keys = Object.keys(object.envVariables), i = 0; i < keys.length; ++i) + message.envVariables[keys[i]] = String(object.envVariables[keys[i]]); + } + if (object.pythonVersion != null) + message.pythonVersion = String(object.pythonVersion); + return message; + }; + + /** + * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} message SoftwareConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwareConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.airflowConfigOverrides = {}; + object.pypiPackages = {}; + object.envVariables = {}; + } + if (options.defaults) { + object.imageVersion = ""; + object.pythonVersion = ""; + } + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + var keys2; + if (message.airflowConfigOverrides && (keys2 = Object.keys(message.airflowConfigOverrides)).length) { + object.airflowConfigOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.airflowConfigOverrides[keys2[j]] = message.airflowConfigOverrides[keys2[j]]; + } + if (message.pypiPackages && (keys2 = Object.keys(message.pypiPackages)).length) { + object.pypiPackages = {}; + for (var j = 0; j < keys2.length; ++j) + object.pypiPackages[keys2[j]] = message.pypiPackages[keys2[j]]; + } + if (message.envVariables && (keys2 = Object.keys(message.envVariables)).length) { + object.envVariables = {}; + for (var j = 0; j < keys2.length; ++j) + object.envVariables[keys2[j]] = message.envVariables[keys2[j]]; + } + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + object.pythonVersion = message.pythonVersion; + return object; + }; + + /** + * Converts this SoftwareConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + * @returns {Object.} JSON object + */ + SoftwareConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SoftwareConfig; + })(); + + v1.IPAllocationPolicy = (function() { + + /** + * Properties of a IPAllocationPolicy. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IIPAllocationPolicy + * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases + * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName + * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock + * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName + * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock + */ + + /** + * Constructs a new IPAllocationPolicy. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a IPAllocationPolicy. + * @implements IIPAllocationPolicy + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy=} [properties] Properties to set + */ + function IPAllocationPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IPAllocationPolicy useIpAliases. + * @member {boolean} useIpAliases + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.useIpAliases = false; + + /** + * IPAllocationPolicy clusterSecondaryRangeName. + * @member {string|null|undefined} clusterSecondaryRangeName + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterSecondaryRangeName = null; + + /** + * IPAllocationPolicy clusterIpv4CidrBlock. + * @member {string|null|undefined} clusterIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterIpv4CidrBlock = null; + + /** + * IPAllocationPolicy servicesSecondaryRangeName. + * @member {string|null|undefined} servicesSecondaryRangeName + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesSecondaryRangeName = null; + + /** + * IPAllocationPolicy servicesIpv4CidrBlock. + * @member {string|null|undefined} servicesIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv4CidrBlock = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * IPAllocationPolicy clusterIpAllocation. + * @member {"clusterSecondaryRangeName"|"clusterIpv4CidrBlock"|undefined} clusterIpAllocation + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + Object.defineProperty(IPAllocationPolicy.prototype, "clusterIpAllocation", { + get: $util.oneOfGetter($oneOfFields = ["clusterSecondaryRangeName", "clusterIpv4CidrBlock"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * IPAllocationPolicy servicesIpAllocation. + * @member {"servicesSecondaryRangeName"|"servicesIpv4CidrBlock"|undefined} servicesIpAllocation + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + Object.defineProperty(IPAllocationPolicy.prototype, "servicesIpAllocation", { + get: $util.oneOfGetter($oneOfFields = ["servicesSecondaryRangeName", "servicesIpv4CidrBlock"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy instance + */ + IPAllocationPolicy.create = function create(properties) { + return new IPAllocationPolicy(properties); + }; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); + if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterSecondaryRangeName); + if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.servicesSecondaryRangeName); + if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4CidrBlock); + if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.servicesIpv4CidrBlock); + return writer; + }; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.useIpAliases = reader.bool(); + break; + case 2: + message.clusterSecondaryRangeName = reader.string(); + break; + case 4: + message.clusterIpv4CidrBlock = reader.string(); + break; + case 3: + message.servicesSecondaryRangeName = reader.string(); + break; + case 5: + message.servicesIpv4CidrBlock = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a IPAllocationPolicy message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IPAllocationPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + if (typeof message.useIpAliases !== "boolean") + return "useIpAliases: boolean expected"; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) { + properties.clusterIpAllocation = 1; + if (!$util.isString(message.clusterSecondaryRangeName)) + return "clusterSecondaryRangeName: string expected"; + } + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) { + if (properties.clusterIpAllocation === 1) + return "clusterIpAllocation: multiple values"; + properties.clusterIpAllocation = 1; + if (!$util.isString(message.clusterIpv4CidrBlock)) + return "clusterIpv4CidrBlock: string expected"; + } + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) { + properties.servicesIpAllocation = 1; + if (!$util.isString(message.servicesSecondaryRangeName)) + return "servicesSecondaryRangeName: string expected"; + } + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) { + if (properties.servicesIpAllocation === 1) + return "servicesIpAllocation: multiple values"; + properties.servicesIpAllocation = 1; + if (!$util.isString(message.servicesIpv4CidrBlock)) + return "servicesIpv4CidrBlock: string expected"; + } + return null; + }; + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy + */ + IPAllocationPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy(); + if (object.useIpAliases != null) + message.useIpAliases = Boolean(object.useIpAliases); + if (object.clusterSecondaryRangeName != null) + message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); + if (object.clusterIpv4CidrBlock != null) + message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); + if (object.servicesSecondaryRangeName != null) + message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); + if (object.servicesIpv4CidrBlock != null) + message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); + return message; + }; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} message IPAllocationPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IPAllocationPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.useIpAliases = false; + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + object.useIpAliases = message.useIpAliases; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) { + object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; + if (options.oneofs) + object.clusterIpAllocation = "clusterSecondaryRangeName"; + } + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) { + object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; + if (options.oneofs) + object.servicesIpAllocation = "servicesSecondaryRangeName"; + } + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) { + object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; + if (options.oneofs) + object.clusterIpAllocation = "clusterIpv4CidrBlock"; + } + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) { + object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; + if (options.oneofs) + object.servicesIpAllocation = "servicesIpv4CidrBlock"; + } + return object; + }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + * @returns {Object.} JSON object + */ + IPAllocationPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IPAllocationPolicy; + })(); + + v1.NodeConfig = (function() { + + /** + * Properties of a NodeConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface INodeConfig + * @property {string|null} [location] NodeConfig location + * @property {string|null} [machineType] NodeConfig machineType + * @property {string|null} [network] NodeConfig network + * @property {string|null} [subnetwork] NodeConfig subnetwork + * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb + * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes + * @property {string|null} [serviceAccount] NodeConfig serviceAccount + * @property {Array.|null} [tags] NodeConfig tags + * @property {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null} [ipAllocationPolicy] NodeConfig ipAllocationPolicy + */ + + /** + * Constructs a new NodeConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a NodeConfig. + * @implements INodeConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig=} [properties] Properties to set + */ + function NodeConfig(properties) { + this.oauthScopes = []; + 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]]; + } + + /** + * NodeConfig location. + * @member {string} location + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.location = ""; + + /** + * NodeConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.machineType = ""; + + /** + * NodeConfig network. + * @member {string} network + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.network = ""; + + /** + * NodeConfig subnetwork. + * @member {string} subnetwork + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.subnetwork = ""; + + /** + * NodeConfig diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.diskSizeGb = 0; + + /** + * NodeConfig oauthScopes. + * @member {Array.} oauthScopes + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.oauthScopes = $util.emptyArray; + + /** + * NodeConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.serviceAccount = ""; + + /** + * NodeConfig tags. + * @member {Array.} tags + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.tags = $util.emptyArray; + + /** + * NodeConfig ipAllocationPolicy. + * @member {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.ipAllocationPolicy = null; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig instance + */ + NodeConfig.create = function create(properties) { + return new NodeConfig(properties); + }; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.machineType); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subnetwork); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.diskSizeGb); + if (message.oauthScopes != null && message.oauthScopes.length) + for (var i = 0; i < message.oauthScopes.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.oauthScopes[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccount); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); + if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) + $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.NodeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = reader.string(); + break; + case 2: + message.machineType = reader.string(); + break; + case 3: + message.network = reader.string(); + break; + case 4: + message.subnetwork = reader.string(); + break; + case 5: + message.diskSizeGb = reader.int32(); + break; + case 6: + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + case 7: + message.serviceAccount = reader.string(); + break; + case 8: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 9: + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { + if (!Array.isArray(message.oauthScopes)) + return "oauthScopes: array expected"; + for (var i = 0; i < message.oauthScopes.length; ++i) + if (!$util.isString(message.oauthScopes[i])) + return "oauthScopes: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify(message.ipAllocationPolicy); + if (error) + return "ipAllocationPolicy." + error; + } + return null; + }; + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig + */ + NodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.NodeConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.NodeConfig(); + if (object.location != null) + message.location = String(object.location); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.oauthScopes) { + if (!Array.isArray(object.oauthScopes)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.oauthScopes: array expected"); + message.oauthScopes = []; + for (var i = 0; i < object.oauthScopes.length; ++i) + message.oauthScopes[i] = String(object.oauthScopes[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.ipAllocationPolicy != null) { + if (typeof object.ipAllocationPolicy !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.ipAllocationPolicy: object expected"); + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); + } + return message; + }; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.NodeConfig} message NodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.oauthScopes = []; + object.tags = []; + } + if (options.defaults) { + object.location = ""; + object.machineType = ""; + object.network = ""; + object.subnetwork = ""; + object.diskSizeGb = 0; + object.serviceAccount = ""; + object.ipAllocationPolicy = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.oauthScopes && message.oauthScopes.length) { + object.oauthScopes = []; + for (var j = 0; j < message.oauthScopes.length; ++j) + object.oauthScopes[j] = message.oauthScopes[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + 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.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) + object.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); + return object; + }; + + /** + * Converts this NodeConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + * @returns {Object.} JSON object + */ + NodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NodeConfig; + })(); + + v1.PrivateClusterConfig = (function() { + + /** + * Properties of a PrivateClusterConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IPrivateClusterConfig + * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint + * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock + * @property {string|null} [masterIpv4ReservedRange] PrivateClusterConfig masterIpv4ReservedRange + */ + + /** + * Constructs a new PrivateClusterConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a PrivateClusterConfig. + * @implements IPrivateClusterConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig=} [properties] Properties to set + */ + function PrivateClusterConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateClusterConfig enablePrivateEndpoint. + * @member {boolean} enablePrivateEndpoint + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.enablePrivateEndpoint = false; + + /** + * PrivateClusterConfig masterIpv4CidrBlock. + * @member {string} masterIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; + + /** + * PrivateClusterConfig masterIpv4ReservedRange. + * @member {string} masterIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4ReservedRange = ""; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig instance + */ + PrivateClusterConfig.create = function create(properties) { + return new PrivateClusterConfig(properties); + }; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEndpoint); + if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.masterIpv4CidrBlock); + if (message.masterIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "masterIpv4ReservedRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4ReservedRange); + return writer; + }; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enablePrivateEndpoint = reader.bool(); + break; + case 2: + message.masterIpv4CidrBlock = reader.string(); + break; + case 3: + message.masterIpv4ReservedRange = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateClusterConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateClusterConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + if (typeof message.enablePrivateEndpoint !== "boolean") + return "enablePrivateEndpoint: boolean expected"; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + if (!$util.isString(message.masterIpv4CidrBlock)) + return "masterIpv4CidrBlock: string expected"; + if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) + if (!$util.isString(message.masterIpv4ReservedRange)) + return "masterIpv4ReservedRange: string expected"; + return null; + }; + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig + */ + PrivateClusterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig(); + if (object.enablePrivateEndpoint != null) + message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); + if (object.masterIpv4CidrBlock != null) + message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); + if (object.masterIpv4ReservedRange != null) + message.masterIpv4ReservedRange = String(object.masterIpv4ReservedRange); + return message; + }; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} message PrivateClusterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateClusterConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateEndpoint = false; + object.masterIpv4CidrBlock = ""; + object.masterIpv4ReservedRange = ""; + } + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + object.enablePrivateEndpoint = message.enablePrivateEndpoint; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; + if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) + object.masterIpv4ReservedRange = message.masterIpv4ReservedRange; + return object; + }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateClusterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivateClusterConfig; + })(); + + v1.PrivateEnvironmentConfig = (function() { + + /** + * Properties of a PrivateEnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IPrivateEnvironmentConfig + * @property {boolean|null} [enablePrivateEnvironment] PrivateEnvironmentConfig enablePrivateEnvironment + * @property {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null} [privateClusterConfig] PrivateEnvironmentConfig privateClusterConfig + * @property {string|null} [webServerIpv4CidrBlock] PrivateEnvironmentConfig webServerIpv4CidrBlock + * @property {string|null} [cloudSqlIpv4CidrBlock] PrivateEnvironmentConfig cloudSqlIpv4CidrBlock + * @property {string|null} [webServerIpv4ReservedRange] PrivateEnvironmentConfig webServerIpv4ReservedRange + */ + + /** + * Constructs a new PrivateEnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a PrivateEnvironmentConfig. + * @implements IPrivateEnvironmentConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig=} [properties] Properties to set + */ + function PrivateEnvironmentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateEnvironmentConfig enablePrivateEnvironment. + * @member {boolean} enablePrivateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.enablePrivateEnvironment = false; + + /** + * PrivateEnvironmentConfig privateClusterConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null|undefined} privateClusterConfig + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.privateClusterConfig = null; + + /** + * PrivateEnvironmentConfig webServerIpv4CidrBlock. + * @member {string} webServerIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.webServerIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. + * @member {string} cloudSqlIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudSqlIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig webServerIpv4ReservedRange. + * @member {string} webServerIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.webServerIpv4ReservedRange = ""; + + /** + * Creates a new PrivateEnvironmentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig instance + */ + PrivateEnvironmentConfig.create = function create(properties) { + return new PrivateEnvironmentConfig(properties); + }; + + /** + * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateEnvironmentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateEnvironment != null && Object.hasOwnProperty.call(message, "enablePrivateEnvironment")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEnvironment); + if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) + $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.webServerIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "webServerIpv4CidrBlock")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.webServerIpv4CidrBlock); + if (message.cloudSqlIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudSqlIpv4CidrBlock")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cloudSqlIpv4CidrBlock); + if (message.webServerIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "webServerIpv4ReservedRange")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.webServerIpv4ReservedRange); + return writer; + }; + + /** + * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateEnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateEnvironmentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enablePrivateEnvironment = reader.bool(); + break; + case 2: + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + case 3: + message.webServerIpv4CidrBlock = reader.string(); + break; + case 4: + message.cloudSqlIpv4CidrBlock = reader.string(); + break; + case 5: + message.webServerIpv4ReservedRange = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateEnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateEnvironmentConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateEnvironmentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) + if (typeof message.enablePrivateEnvironment !== "boolean") + return "enablePrivateEnvironment: boolean expected"; + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify(message.privateClusterConfig); + if (error) + return "privateClusterConfig." + error; + } + if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) + if (!$util.isString(message.webServerIpv4CidrBlock)) + return "webServerIpv4CidrBlock: string expected"; + if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) + if (!$util.isString(message.cloudSqlIpv4CidrBlock)) + return "cloudSqlIpv4CidrBlock: string expected"; + if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) + if (!$util.isString(message.webServerIpv4ReservedRange)) + return "webServerIpv4ReservedRange: string expected"; + return null; + }; + + /** + * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + */ + PrivateEnvironmentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig(); + if (object.enablePrivateEnvironment != null) + message.enablePrivateEnvironment = Boolean(object.enablePrivateEnvironment); + if (object.privateClusterConfig != null) { + if (typeof object.privateClusterConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.privateClusterConfig: object expected"); + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.fromObject(object.privateClusterConfig); + } + if (object.webServerIpv4CidrBlock != null) + message.webServerIpv4CidrBlock = String(object.webServerIpv4CidrBlock); + if (object.cloudSqlIpv4CidrBlock != null) + message.cloudSqlIpv4CidrBlock = String(object.cloudSqlIpv4CidrBlock); + if (object.webServerIpv4ReservedRange != null) + message.webServerIpv4ReservedRange = String(object.webServerIpv4ReservedRange); + return message; + }; + + /** + * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} message PrivateEnvironmentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateEnvironmentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateEnvironment = false; + object.privateClusterConfig = null; + object.webServerIpv4CidrBlock = ""; + object.cloudSqlIpv4CidrBlock = ""; + object.webServerIpv4ReservedRange = ""; + } + if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) + object.enablePrivateEnvironment = message.enablePrivateEnvironment; + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) + object.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); + if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) + object.webServerIpv4CidrBlock = message.webServerIpv4CidrBlock; + if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) + object.cloudSqlIpv4CidrBlock = message.cloudSqlIpv4CidrBlock; + if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) + object.webServerIpv4ReservedRange = message.webServerIpv4ReservedRange; + return object; + }; + + /** + * Converts this PrivateEnvironmentConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateEnvironmentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivateEnvironmentConfig; + })(); + + v1.Environment = (function() { + + /** + * Properties of an Environment. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null} [config] Environment config + * @property {string|null} [uuid] Environment uuid + * @property {google.cloud.orchestration.airflow.service.v1.Environment.State|null} [state] Environment state + * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {Object.|null} [labels] Environment labels + */ + + /** + * Constructs a new Environment. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an Environment. + * @implements IEnvironment + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment=} [properties] Properties to set + */ + function Environment(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]]; + } + + /** + * Environment name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.name = ""; + + /** + * Environment config. + * @member {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null|undefined} config + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.config = null; + + /** + * Environment uuid. + * @member {string} uuid + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.uuid = ""; + + /** + * Environment state. + * @member {google.cloud.orchestration.airflow.service.v1.Environment.State} state + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.state = 0; + + /** + * Environment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.createTime = null; + + /** + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.updateTime = null; + + /** + * Environment labels. + * @member {Object.} labels + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.labels = $util.emptyObject; + + /** + * Creates a new Environment instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment instance + */ + Environment.create = function create(properties) { + return new Environment(properties); + }; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1.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.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uuid); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.Environment(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.decode(reader, reader.uint32()); + break; + case 3: + message.uuid = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.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.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment + */ + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.Environment) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.config: object expected"); + message.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.fromObject(object.config); + } + if (object.uuid != null) + message.uuid = String(object.uuid); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1.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.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + object.uuid = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.toObject(message.config, options); + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.Environment.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this Environment to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + * @returns {Object.} JSON object + */ + Environment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.orchestration.airflow.service.v1.Environment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} ERROR=5 ERROR value + */ + Environment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return Environment; + })(); + + v1.CheckUpgradeResponse = (function() { + + /** + * Properties of a CheckUpgradeResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ICheckUpgradeResponse + * @property {string|null} [buildLogUri] CheckUpgradeResponse buildLogUri + * @property {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|null} [containsPypiModulesConflict] CheckUpgradeResponse containsPypiModulesConflict + * @property {string|null} [pypiConflictBuildLogExtract] CheckUpgradeResponse pypiConflictBuildLogExtract + * @property {string|null} [imageVersion] CheckUpgradeResponse imageVersion + * @property {Object.|null} [pypiDependencies] CheckUpgradeResponse pypiDependencies + */ + + /** + * Constructs a new CheckUpgradeResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a CheckUpgradeResponse. + * @implements ICheckUpgradeResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse=} [properties] Properties to set + */ + function CheckUpgradeResponse(properties) { + this.pypiDependencies = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckUpgradeResponse buildLogUri. + * @member {string} buildLogUri + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.buildLogUri = ""; + + /** + * CheckUpgradeResponse containsPypiModulesConflict. + * @member {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult} containsPypiModulesConflict + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.containsPypiModulesConflict = 0; + + /** + * CheckUpgradeResponse pypiConflictBuildLogExtract. + * @member {string} pypiConflictBuildLogExtract + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.pypiConflictBuildLogExtract = ""; + + /** + * CheckUpgradeResponse imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.imageVersion = ""; + + /** + * CheckUpgradeResponse pypiDependencies. + * @member {Object.} pypiDependencies + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.pypiDependencies = $util.emptyObject; + + /** + * Creates a new CheckUpgradeResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse instance + */ + CheckUpgradeResponse.create = function create(properties) { + return new CheckUpgradeResponse(properties); + }; + + /** + * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buildLogUri != null && Object.hasOwnProperty.call(message, "buildLogUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildLogUri); + if (message.pypiConflictBuildLogExtract != null && Object.hasOwnProperty.call(message, "pypiConflictBuildLogExtract")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pypiConflictBuildLogExtract); + if (message.containsPypiModulesConflict != null && Object.hasOwnProperty.call(message, "containsPypiModulesConflict")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.containsPypiModulesConflict); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageVersion); + if (message.pypiDependencies != null && Object.hasOwnProperty.call(message, "pypiDependencies")) + for (var keys = Object.keys(message.pypiDependencies), 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.pypiDependencies[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.buildLogUri = reader.string(); + break; + case 4: + message.containsPypiModulesConflict = reader.int32(); + break; + case 3: + message.pypiConflictBuildLogExtract = reader.string(); + break; + case 5: + message.imageVersion = reader.string(); + break; + case 6: + if (message.pypiDependencies === $util.emptyObject) + message.pypiDependencies = {}; + 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.pypiDependencies[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckUpgradeResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckUpgradeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) + if (!$util.isString(message.buildLogUri)) + return "buildLogUri: string expected"; + if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) + switch (message.containsPypiModulesConflict) { + default: + return "containsPypiModulesConflict: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) + if (!$util.isString(message.pypiConflictBuildLogExtract)) + return "pypiConflictBuildLogExtract: string expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.pypiDependencies != null && message.hasOwnProperty("pypiDependencies")) { + if (!$util.isObject(message.pypiDependencies)) + return "pypiDependencies: object expected"; + var key = Object.keys(message.pypiDependencies); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pypiDependencies[key[i]])) + return "pypiDependencies: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse + */ + CheckUpgradeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse(); + if (object.buildLogUri != null) + message.buildLogUri = String(object.buildLogUri); + switch (object.containsPypiModulesConflict) { + case "CONFLICT_RESULT_UNSPECIFIED": + case 0: + message.containsPypiModulesConflict = 0; + break; + case "CONFLICT": + case 1: + message.containsPypiModulesConflict = 1; + break; + case "NO_CONFLICT": + case 2: + message.containsPypiModulesConflict = 2; + break; + } + if (object.pypiConflictBuildLogExtract != null) + message.pypiConflictBuildLogExtract = String(object.pypiConflictBuildLogExtract); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.pypiDependencies) { + if (typeof object.pypiDependencies !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.pypiDependencies: object expected"); + message.pypiDependencies = {}; + for (var keys = Object.keys(object.pypiDependencies), i = 0; i < keys.length; ++i) + message.pypiDependencies[keys[i]] = String(object.pypiDependencies[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} message CheckUpgradeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckUpgradeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.pypiDependencies = {}; + if (options.defaults) { + object.buildLogUri = ""; + object.pypiConflictBuildLogExtract = ""; + object.containsPypiModulesConflict = options.enums === String ? "CONFLICT_RESULT_UNSPECIFIED" : 0; + object.imageVersion = ""; + } + if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) + object.buildLogUri = message.buildLogUri; + if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) + object.pypiConflictBuildLogExtract = message.pypiConflictBuildLogExtract; + if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) + object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + var keys2; + if (message.pypiDependencies && (keys2 = Object.keys(message.pypiDependencies)).length) { + object.pypiDependencies = {}; + for (var j = 0; j < keys2.length; ++j) + object.pypiDependencies[keys2[j]] = message.pypiDependencies[keys2[j]]; + } + return object; + }; + + /** + * Converts this CheckUpgradeResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + * @returns {Object.} JSON object + */ + CheckUpgradeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ConflictResult enum. + * @name google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + * @enum {number} + * @property {number} CONFLICT_RESULT_UNSPECIFIED=0 CONFLICT_RESULT_UNSPECIFIED value + * @property {number} CONFLICT=1 CONFLICT value + * @property {number} NO_CONFLICT=2 NO_CONFLICT value + */ + CheckUpgradeResponse.ConflictResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONFLICT_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFLICT"] = 1; + values[valuesById[2] = "NO_CONFLICT"] = 2; + return values; + })(); + + return CheckUpgradeResponse; + })(); + + v1.ImageVersions = (function() { + + /** + * Constructs a new ImageVersions service. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an ImageVersions + * @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 ImageVersions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ImageVersions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageVersions; + + /** + * Creates new ImageVersions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions + * @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 {ImageVersions} RPC service. Useful where requests and/or responses are streamed. + */ + ImageVersions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions#listImageVersions}. + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions + * @typedef ListImageVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} [response] ListImageVersionsResponse + */ + + /** + * Calls ListImageVersions. + * @function listImageVersions + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersionsCallback} callback Node-style callback called with the error, if any, and ListImageVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ImageVersions.prototype.listImageVersions = function listImageVersions(request, callback) { + return this.rpcCall(listImageVersions, $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse, request, callback); + }, "name", { value: "ListImageVersions" }); + + /** + * Calls ListImageVersions. + * @function listImageVersions + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ImageVersions; + })(); + + v1.ListImageVersionsRequest = (function() { + + /** + * Properties of a ListImageVersionsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListImageVersionsRequest + * @property {string|null} [parent] ListImageVersionsRequest parent + * @property {number|null} [pageSize] ListImageVersionsRequest pageSize + * @property {string|null} [pageToken] ListImageVersionsRequest pageToken + * @property {boolean|null} [includePastReleases] ListImageVersionsRequest includePastReleases + */ + + /** + * Constructs a new ListImageVersionsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListImageVersionsRequest. + * @implements IListImageVersionsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest=} [properties] Properties to set + */ + function ListImageVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImageVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.parent = ""; + + /** + * ListImageVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.pageSize = 0; + + /** + * ListImageVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.pageToken = ""; + + /** + * ListImageVersionsRequest includePastReleases. + * @member {boolean} includePastReleases + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.includePastReleases = false; + + /** + * Creates a new ListImageVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest instance + */ + ListImageVersionsRequest.create = function create(properties) { + return new ListImageVersionsRequest(properties); + }; + + /** + * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsRequest.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.includePastReleases != null && Object.hasOwnProperty.call(message, "includePastReleases")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includePastReleases); + return writer; + }; + + /** + * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest(); + 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.includePastReleases = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImageVersionsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImageVersionsRequest.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.includePastReleases != null && message.hasOwnProperty("includePastReleases")) + if (typeof message.includePastReleases !== "boolean") + return "includePastReleases: boolean expected"; + return null; + }; + + /** + * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest + */ + ListImageVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest(); + 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.includePastReleases != null) + message.includePastReleases = Boolean(object.includePastReleases); + return message; + }; + + /** + * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} message ListImageVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImageVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.includePastReleases = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.includePastReleases != null && message.hasOwnProperty("includePastReleases")) + object.includePastReleases = message.includePastReleases; + return object; + }; + + /** + * Converts this ListImageVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListImageVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListImageVersionsRequest; + })(); + + v1.ListImageVersionsResponse = (function() { + + /** + * Properties of a ListImageVersionsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListImageVersionsResponse + * @property {Array.|null} [imageVersions] ListImageVersionsResponse imageVersions + * @property {string|null} [nextPageToken] ListImageVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListImageVersionsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListImageVersionsResponse. + * @implements IListImageVersionsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse=} [properties] Properties to set + */ + function ListImageVersionsResponse(properties) { + this.imageVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImageVersionsResponse imageVersions. + * @member {Array.} imageVersions + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @instance + */ + ListImageVersionsResponse.prototype.imageVersions = $util.emptyArray; + + /** + * ListImageVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @instance + */ + ListImageVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListImageVersionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse instance + */ + ListImageVersionsResponse.create = function create(properties) { + return new ListImageVersionsResponse(properties); + }; + + /** + * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersions != null && message.imageVersions.length) + for (var i = 0; i < message.imageVersions.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.encode(message.imageVersions[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 ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.imageVersions && message.imageVersions.length)) + message.imageVersions = []; + message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1.ImageVersion.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImageVersionsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImageVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersions != null && message.hasOwnProperty("imageVersions")) { + if (!Array.isArray(message.imageVersions)) + return "imageVersions: array expected"; + for (var i = 0; i < message.imageVersions.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.verify(message.imageVersions[i]); + if (error) + return "imageVersions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse + */ + ListImageVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse(); + if (object.imageVersions) { + if (!Array.isArray(object.imageVersions)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.imageVersions: array expected"); + message.imageVersions = []; + for (var i = 0; i < object.imageVersions.length; ++i) { + if (typeof object.imageVersions[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.imageVersions: object expected"); + message.imageVersions[i] = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.fromObject(object.imageVersions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} message ListImageVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImageVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.imageVersions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.imageVersions && message.imageVersions.length) { + object.imageVersions = []; + for (var j = 0; j < message.imageVersions.length; ++j) + object.imageVersions[j] = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.toObject(message.imageVersions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListImageVersionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListImageVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListImageVersionsResponse; + })(); + + v1.ImageVersion = (function() { + + /** + * Properties of an ImageVersion. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IImageVersion + * @property {string|null} [imageVersionId] ImageVersion imageVersionId + * @property {boolean|null} [isDefault] ImageVersion isDefault + * @property {Array.|null} [supportedPythonVersions] ImageVersion supportedPythonVersions + * @property {google.type.IDate|null} [releaseDate] ImageVersion releaseDate + * @property {boolean|null} [creationDisabled] ImageVersion creationDisabled + * @property {boolean|null} [upgradeDisabled] ImageVersion upgradeDisabled + */ + + /** + * Constructs a new ImageVersion. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an ImageVersion. + * @implements IImageVersion + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion=} [properties] Properties to set + */ + function ImageVersion(properties) { + this.supportedPythonVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageVersion imageVersionId. + * @member {string} imageVersionId + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.imageVersionId = ""; + + /** + * ImageVersion isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.isDefault = false; + + /** + * ImageVersion supportedPythonVersions. + * @member {Array.} supportedPythonVersions + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.supportedPythonVersions = $util.emptyArray; + + /** + * ImageVersion releaseDate. + * @member {google.type.IDate|null|undefined} releaseDate + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.releaseDate = null; + + /** + * ImageVersion creationDisabled. + * @member {boolean} creationDisabled + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.creationDisabled = false; + + /** + * ImageVersion upgradeDisabled. + * @member {boolean} upgradeDisabled + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.upgradeDisabled = false; + + /** + * Creates a new ImageVersion instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion instance + */ + ImageVersion.create = function create(properties) { + return new ImageVersion(properties); + }; + + /** + * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion} message ImageVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersionId != null && Object.hasOwnProperty.call(message, "imageVersionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersionId); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); + if (message.supportedPythonVersions != null && message.supportedPythonVersions.length) + for (var i = 0; i < message.supportedPythonVersions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedPythonVersions[i]); + if (message.releaseDate != null && Object.hasOwnProperty.call(message, "releaseDate")) + $root.google.type.Date.encode(message.releaseDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.creationDisabled != null && Object.hasOwnProperty.call(message, "creationDisabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.creationDisabled); + if (message.upgradeDisabled != null && Object.hasOwnProperty.call(message, "upgradeDisabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.upgradeDisabled); + return writer; + }; + + /** + * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion} message ImageVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ImageVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.imageVersionId = reader.string(); + break; + case 2: + message.isDefault = reader.bool(); + break; + case 3: + if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) + message.supportedPythonVersions = []; + message.supportedPythonVersions.push(reader.string()); + break; + case 4: + message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + case 5: + message.creationDisabled = reader.bool(); + break; + case 6: + message.upgradeDisabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageVersion message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) + if (!$util.isString(message.imageVersionId)) + return "imageVersionId: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; + if (message.supportedPythonVersions != null && message.hasOwnProperty("supportedPythonVersions")) { + if (!Array.isArray(message.supportedPythonVersions)) + return "supportedPythonVersions: array expected"; + for (var i = 0; i < message.supportedPythonVersions.length; ++i) + if (!$util.isString(message.supportedPythonVersions[i])) + return "supportedPythonVersions: string[] expected"; + } + if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) { + var error = $root.google.type.Date.verify(message.releaseDate); + if (error) + return "releaseDate." + error; + } + if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) + if (typeof message.creationDisabled !== "boolean") + return "creationDisabled: boolean expected"; + if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) + if (typeof message.upgradeDisabled !== "boolean") + return "upgradeDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ImageVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion + */ + ImageVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ImageVersion) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ImageVersion(); + if (object.imageVersionId != null) + message.imageVersionId = String(object.imageVersionId); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); + if (object.supportedPythonVersions) { + if (!Array.isArray(object.supportedPythonVersions)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ImageVersion.supportedPythonVersions: array expected"); + message.supportedPythonVersions = []; + for (var i = 0; i < object.supportedPythonVersions.length; ++i) + message.supportedPythonVersions[i] = String(object.supportedPythonVersions[i]); + } + if (object.releaseDate != null) { + if (typeof object.releaseDate !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ImageVersion.releaseDate: object expected"); + message.releaseDate = $root.google.type.Date.fromObject(object.releaseDate); + } + if (object.creationDisabled != null) + message.creationDisabled = Boolean(object.creationDisabled); + if (object.upgradeDisabled != null) + message.upgradeDisabled = Boolean(object.upgradeDisabled); + return message; + }; + + /** + * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ImageVersion} message ImageVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.supportedPythonVersions = []; + if (options.defaults) { + object.imageVersionId = ""; + object.isDefault = false; + object.releaseDate = null; + object.creationDisabled = false; + object.upgradeDisabled = false; + } + if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) + object.imageVersionId = message.imageVersionId; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; + if (message.supportedPythonVersions && message.supportedPythonVersions.length) { + object.supportedPythonVersions = []; + for (var j = 0; j < message.supportedPythonVersions.length; ++j) + object.supportedPythonVersions[j] = message.supportedPythonVersions[j]; + } + if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) + object.releaseDate = $root.google.type.Date.toObject(message.releaseDate, options); + if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) + object.creationDisabled = message.creationDisabled; + if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) + object.upgradeDisabled = message.upgradeDisabled; + return object; + }; + + /** + * Converts this ImageVersion to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + * @returns {Object.} JSON object + */ + ImageVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImageVersion; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IOperationMetadata + * @property {google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|null} [state] OperationMetadata state + * @property {google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|null} [operationType] OperationMetadata operationType + * @property {string|null} [resource] OperationMetadata resource + * @property {string|null} [resourceUuid] OperationMetadata resourceUuid + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata state. + * @member {google.cloud.orchestration.airflow.service.v1.OperationMetadata.State} state + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.state = 0; + + /** + * OperationMetadata operationType. + * @member {google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type} operationType + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.operationType = 0; + + /** + * OperationMetadata resource. + * @member {string} resource + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resource = ""; + + /** + * OperationMetadata resourceUuid. + * @member {string} resourceUuid + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resourceUuid = ""; + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operationType); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.resourceUuid != null && Object.hasOwnProperty.call(message, "resourceUuid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUuid); + 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.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 OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.operationType = reader.int32(); + break; + case 3: + message.resource = reader.string(); + break; + case 4: + message.resourceUuid = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 3: + case 4: + break; + } + if (message.operationType != null && message.hasOwnProperty("operationType")) + switch (message.operationType) { + default: + return "operationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) + if (!$util.isString(message.resourceUuid)) + return "resourceUuid: 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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata(); + switch (object.state) { + 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 "SUCCEEDED": + case 3: + message.state = 3; + break; + case "SUCCESSFUL": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + } + switch (object.operationType) { + case "TYPE_UNSPECIFIED": + case 0: + message.operationType = 0; + break; + case "CREATE": + case 1: + message.operationType = 1; + break; + case "DELETE": + case 2: + message.operationType = 2; + break; + case "UPDATE": + case 3: + message.operationType = 3; + break; + case "CHECK": + case 4: + message.operationType = 4; + break; + } + if (object.resource != null) + message.resource = String(object.resource); + if (object.resourceUuid != null) + message.resourceUuid = String(object.resourceUuid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.resource = ""; + object.resourceUuid = ""; + object.createTime = null; + object.endTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State[message.state] : message.state; + if (message.operationType != null && message.hasOwnProperty("operationType")) + object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type[message.operationType] : message.operationType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) + object.resourceUuid = message.resourceUuid; + 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); + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.orchestration.airflow.service.v1.OperationMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} SUCCESSFUL=3 SUCCESSFUL value + * @property {number} FAILED=4 FAILED value + */ + OperationMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values["SUCCESSFUL"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + /** + * Type enum. + * @name google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} DELETE=2 DELETE value + * @property {number} UPDATE=3 UPDATE value + * @property {number} CHECK=4 CHECK value + */ + OperationMetadata.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "DELETE"] = 2; + values[valuesById[3] = "UPDATE"] = 3; + values[valuesById[4] = "CHECK"] = 4; + return values; + })(); + + return OperationMetadata; + })(); + + return v1; + })(); + + service.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.orchestration.airflow.service + * @namespace + */ + var v1beta1 = {}; + + v1beta1.Environments = (function() { + + /** + * Constructs a new Environments service. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.Environments#createEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#getEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#listEnvironments}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#updateEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#deleteEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#restartWebServer}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef RestartWebServerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestartWebServer. + * @function restartWebServer + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} request RestartWebServerRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.restartWebServer = function restartWebServer(request, callback) { + return this.rpcCall(restartWebServer, $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestartWebServer" }); + + /** + * Calls RestartWebServer. + * @function restartWebServer + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} request RestartWebServerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#checkUpgrade}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef CheckUpgradeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CheckUpgrade. + * @function checkUpgrade + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgradeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.checkUpgrade = function checkUpgrade(request, callback) { + return this.rpcCall(checkUpgrade, $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CheckUpgrade" }); + + /** + * Calls CheckUpgrade. + * @function checkUpgrade + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Environments; + })(); + + v1beta1.CreateEnvironmentRequest = (function() { + + /** + * Properties of a CreateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + */ + + /** + * Constructs a new CreateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest=} [properties] Properties to set + */ + function CreateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.parent = ""; + + /** + * CreateEnvironmentRequest environment. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environment = null; + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + */ + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.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.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + return null; + }; + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + */ + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environment); + } + return message; + }; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.environment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environment, options); + return object; + }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateEnvironmentRequest; + })(); + + v1beta1.GetEnvironmentRequest = (function() { + + /** + * Properties of a GetEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name + */ + + /** + * Constructs a new GetEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest=} [properties] Properties to set + */ + function GetEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @instance + */ + GetEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest instance + */ + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); + }; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encode = function encode(message, writer) { + 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 GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest(); + 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 GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnvironmentRequest.verify = function verify(message) { + if (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 GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest + */ + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEnvironmentRequest.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 GetEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetEnvironmentRequest; + })(); + + v1beta1.ListEnvironmentsRequest = (function() { + + /** + * Properties of a ListEnvironmentsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + */ + + /** + * Constructs a new ListEnvironmentsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest=} [properties] Properties to set + */ + function ListEnvironmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.parent = ""; + + /** + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageSize = 0; + + /** + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + */ + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); + }; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.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 ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest(); + 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 ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsRequest.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 ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + */ + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest(); + 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 ListEnvironmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsRequest.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 ListEnvironmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListEnvironmentsRequest; + })(); + + v1beta1.ListEnvironmentsResponse = (function() { + + /** + * Properties of a ListEnvironmentsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + */ + + /** + * Constructs a new ListEnvironmentsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse=} [properties] Properties to set + */ + function ListEnvironmentsResponse(properties) { + this.environments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + + /** + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + */ + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); + }; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environments[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 ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + */ + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListEnvironmentsResponse; + })(); + + v1beta1.DeleteEnvironmentRequest = (function() { + + /** + * Properties of a DeleteEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name + */ + + /** + * Constructs a new DeleteEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + */ + function DeleteEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @instance + */ + DeleteEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + */ + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); + }; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encode = function encode(message, writer) { + 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 DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest(); + 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 DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEnvironmentRequest.verify = function verify(message) { + if (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 DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + */ + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteEnvironmentRequest; + })(); + + v1beta1.UpdateEnvironmentRequest = (function() { + + /** + * Properties of an UpdateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IUpdateEnvironmentRequest + * @property {string|null} [name] UpdateEnvironmentRequest name + * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + */ + + /** + * Constructs a new UpdateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + */ + function UpdateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.name = ""; + + /** + * UpdateEnvironmentRequest environment. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.environment = null; + + /** + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + */ + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + 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 UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.name = reader.string(); + break; + case 1: + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environment); + if (error) + return "environment." + 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + */ + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = null; + object.name = ""; + object.updateMask = null; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateEnvironmentRequest; + })(); + + v1beta1.RestartWebServerRequest = (function() { + + /** + * Properties of a RestartWebServerRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IRestartWebServerRequest + * @property {string|null} [name] RestartWebServerRequest name + */ + + /** + * Constructs a new RestartWebServerRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a RestartWebServerRequest. + * @implements IRestartWebServerRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest=} [properties] Properties to set + */ + function RestartWebServerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestartWebServerRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @instance + */ + RestartWebServerRequest.prototype.name = ""; + + /** + * Creates a new RestartWebServerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest instance + */ + RestartWebServerRequest.create = function create(properties) { + return new RestartWebServerRequest(properties); + }; + + /** + * Encodes the specified RestartWebServerRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} message RestartWebServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestartWebServerRequest.encode = function encode(message, writer) { + 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 RestartWebServerRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} message RestartWebServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestartWebServerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestartWebServerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestartWebServerRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest(); + 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 RestartWebServerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestartWebServerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestartWebServerRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestartWebServerRequest.verify = function verify(message) { + if (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 RestartWebServerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest + */ + RestartWebServerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RestartWebServerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} message RestartWebServerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestartWebServerRequest.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 RestartWebServerRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @instance + * @returns {Object.} JSON object + */ + RestartWebServerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RestartWebServerRequest; + })(); + + v1beta1.EnvironmentConfig = (function() { + + /** + * Properties of an EnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IEnvironmentConfig + * @property {string|null} [gkeCluster] EnvironmentConfig gkeCluster + * @property {string|null} [dagGcsPrefix] EnvironmentConfig dagGcsPrefix + * @property {number|null} [nodeCount] EnvironmentConfig nodeCount + * @property {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null} [softwareConfig] EnvironmentConfig softwareConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null} [nodeConfig] EnvironmentConfig nodeConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null} [privateEnvironmentConfig] EnvironmentConfig privateEnvironmentConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null} [webServerNetworkAccessControl] EnvironmentConfig webServerNetworkAccessControl + * @property {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null} [databaseConfig] EnvironmentConfig databaseConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null} [webServerConfig] EnvironmentConfig webServerConfig + * @property {string|null} [airflowUri] EnvironmentConfig airflowUri + * @property {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null} [encryptionConfig] EnvironmentConfig encryptionConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null} [maintenanceWindow] EnvironmentConfig maintenanceWindow + * @property {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null} [workloadsConfig] EnvironmentConfig workloadsConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|null} [environmentSize] EnvironmentConfig environmentSize + */ + + /** + * Constructs a new EnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an EnvironmentConfig. + * @implements IEnvironmentConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig=} [properties] Properties to set + */ + function EnvironmentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnvironmentConfig gkeCluster. + * @member {string} gkeCluster + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.gkeCluster = ""; + + /** + * EnvironmentConfig dagGcsPrefix. + * @member {string} dagGcsPrefix + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.dagGcsPrefix = ""; + + /** + * EnvironmentConfig nodeCount. + * @member {number} nodeCount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.nodeCount = 0; + + /** + * EnvironmentConfig softwareConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null|undefined} softwareConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.softwareConfig = null; + + /** + * EnvironmentConfig nodeConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null|undefined} nodeConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.nodeConfig = null; + + /** + * EnvironmentConfig privateEnvironmentConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null|undefined} privateEnvironmentConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.privateEnvironmentConfig = null; + + /** + * EnvironmentConfig webServerNetworkAccessControl. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null|undefined} webServerNetworkAccessControl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.webServerNetworkAccessControl = null; + + /** + * EnvironmentConfig databaseConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null|undefined} databaseConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.databaseConfig = null; + + /** + * EnvironmentConfig webServerConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null|undefined} webServerConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.webServerConfig = null; + + /** + * EnvironmentConfig airflowUri. + * @member {string} airflowUri + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.airflowUri = ""; + + /** + * EnvironmentConfig encryptionConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.encryptionConfig = null; + + /** + * EnvironmentConfig maintenanceWindow. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null|undefined} maintenanceWindow + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.maintenanceWindow = null; + + /** + * EnvironmentConfig workloadsConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null|undefined} workloadsConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.workloadsConfig = null; + + /** + * EnvironmentConfig environmentSize. + * @member {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize} environmentSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.environmentSize = 0; + + /** + * Creates a new EnvironmentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig instance + */ + EnvironmentConfig.create = function create(properties) { + return new EnvironmentConfig(properties); + }; + + /** + * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gkeCluster != null && Object.hasOwnProperty.call(message, "gkeCluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gkeCluster); + if (message.dagGcsPrefix != null && Object.hasOwnProperty.call(message, "dagGcsPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dagGcsPrefix); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nodeCount); + if (message.softwareConfig != null && Object.hasOwnProperty.call(message, "softwareConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.encode(message.softwareConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.airflowUri != null && Object.hasOwnProperty.call(message, "airflowUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.airflowUri); + if (message.privateEnvironmentConfig != null && Object.hasOwnProperty.call(message, "privateEnvironmentConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.encode(message.privateEnvironmentConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.webServerNetworkAccessControl != null && Object.hasOwnProperty.call(message, "webServerNetworkAccessControl")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.encode(message.webServerNetworkAccessControl, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.databaseConfig != null && Object.hasOwnProperty.call(message, "databaseConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.encode(message.databaseConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.webServerConfig != null && Object.hasOwnProperty.call(message, "webServerConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.encode(message.webServerConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) + $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.workloadsConfig != null && Object.hasOwnProperty.call(message, "workloadsConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.encode(message.workloadsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.environmentSize != null && Object.hasOwnProperty.call(message, "environmentSize")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.environmentSize); + return writer; + }; + + /** + * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gkeCluster = reader.string(); + break; + case 2: + message.dagGcsPrefix = reader.string(); + break; + case 3: + message.nodeCount = reader.int32(); + break; + case 4: + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.decode(reader, reader.uint32()); + break; + case 5: + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.decode(reader, reader.uint32()); + break; + case 7: + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); + break; + case 9: + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); + break; + case 10: + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.decode(reader, reader.uint32()); + break; + case 11: + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.decode(reader, reader.uint32()); + break; + case 6: + message.airflowUri = reader.string(); + break; + case 12: + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.decode(reader, reader.uint32()); + break; + case 13: + message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.decode(reader, reader.uint32()); + break; + case 15: + message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.decode(reader, reader.uint32()); + break; + case 16: + message.environmentSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnvironmentConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnvironmentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + if (!$util.isString(message.gkeCluster)) + return "gkeCluster: string expected"; + if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) + if (!$util.isString(message.dagGcsPrefix)) + return "dagGcsPrefix: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify(message.softwareConfig); + if (error) + return "softwareConfig." + error; + } + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify(message.nodeConfig); + if (error) + return "nodeConfig." + error; + } + if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify(message.privateEnvironmentConfig); + if (error) + return "privateEnvironmentConfig." + error; + } + if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify(message.webServerNetworkAccessControl); + if (error) + return "webServerNetworkAccessControl." + error; + } + if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify(message.databaseConfig); + if (error) + return "databaseConfig." + error; + } + if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify(message.webServerConfig); + if (error) + return "webServerConfig." + error; + } + if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) + if (!$util.isString(message.airflowUri)) + return "airflowUri: string expected"; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify(message.maintenanceWindow); + if (error) + return "maintenanceWindow." + error; + } + if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify(message.workloadsConfig); + if (error) + return "workloadsConfig." + error; + } + if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) + switch (message.environmentSize) { + default: + return "environmentSize: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an EnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig + */ + EnvironmentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig(); + if (object.gkeCluster != null) + message.gkeCluster = String(object.gkeCluster); + if (object.dagGcsPrefix != null) + message.dagGcsPrefix = String(object.dagGcsPrefix); + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.softwareConfig != null) { + if (typeof object.softwareConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.softwareConfig: object expected"); + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.fromObject(object.softwareConfig); + } + if (object.nodeConfig != null) { + if (typeof object.nodeConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.nodeConfig: object expected"); + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.fromObject(object.nodeConfig); + } + if (object.privateEnvironmentConfig != null) { + if (typeof object.privateEnvironmentConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.privateEnvironmentConfig: object expected"); + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.fromObject(object.privateEnvironmentConfig); + } + if (object.webServerNetworkAccessControl != null) { + if (typeof object.webServerNetworkAccessControl !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.webServerNetworkAccessControl: object expected"); + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.fromObject(object.webServerNetworkAccessControl); + } + if (object.databaseConfig != null) { + if (typeof object.databaseConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.databaseConfig: object expected"); + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.fromObject(object.databaseConfig); + } + if (object.webServerConfig != null) { + if (typeof object.webServerConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.webServerConfig: object expected"); + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.fromObject(object.webServerConfig); + } + if (object.airflowUri != null) + message.airflowUri = String(object.airflowUri); + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.fromObject(object.encryptionConfig); + } + if (object.maintenanceWindow != null) { + if (typeof object.maintenanceWindow !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.maintenanceWindow: object expected"); + message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.fromObject(object.maintenanceWindow); + } + if (object.workloadsConfig != null) { + if (typeof object.workloadsConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.workloadsConfig: object expected"); + message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.fromObject(object.workloadsConfig); + } + switch (object.environmentSize) { + case "ENVIRONMENT_SIZE_UNSPECIFIED": + case 0: + message.environmentSize = 0; + break; + case "ENVIRONMENT_SIZE_SMALL": + case 1: + message.environmentSize = 1; + break; + case "ENVIRONMENT_SIZE_MEDIUM": + case 2: + message.environmentSize = 2; + break; + case "ENVIRONMENT_SIZE_LARGE": + case 3: + message.environmentSize = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} message EnvironmentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnvironmentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gkeCluster = ""; + object.dagGcsPrefix = ""; + object.nodeCount = 0; + object.softwareConfig = null; + object.nodeConfig = null; + object.airflowUri = ""; + object.privateEnvironmentConfig = null; + object.webServerNetworkAccessControl = null; + object.databaseConfig = null; + object.webServerConfig = null; + object.encryptionConfig = null; + object.maintenanceWindow = null; + object.workloadsConfig = null; + object.environmentSize = options.enums === String ? "ENVIRONMENT_SIZE_UNSPECIFIED" : 0; + } + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + object.gkeCluster = message.gkeCluster; + if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) + object.dagGcsPrefix = message.dagGcsPrefix; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) + object.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.toObject(message.softwareConfig, options); + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) + object.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.toObject(message.nodeConfig, options); + if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) + object.airflowUri = message.airflowUri; + if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) + object.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.toObject(message.privateEnvironmentConfig, options); + if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) + object.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.toObject(message.webServerNetworkAccessControl, options); + if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) + object.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.toObject(message.databaseConfig, options); + if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) + object.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.toObject(message.webServerConfig, options); + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.toObject(message.encryptionConfig, options); + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) + object.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.toObject(message.maintenanceWindow, options); + if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) + object.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.toObject(message.workloadsConfig, options); + if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) + object.environmentSize = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize[message.environmentSize] : message.environmentSize; + return object; + }; + + /** + * Converts this EnvironmentConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + * @returns {Object.} JSON object + */ + EnvironmentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EnvironmentSize enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + * @enum {number} + * @property {number} ENVIRONMENT_SIZE_UNSPECIFIED=0 ENVIRONMENT_SIZE_UNSPECIFIED value + * @property {number} ENVIRONMENT_SIZE_SMALL=1 ENVIRONMENT_SIZE_SMALL value + * @property {number} ENVIRONMENT_SIZE_MEDIUM=2 ENVIRONMENT_SIZE_MEDIUM value + * @property {number} ENVIRONMENT_SIZE_LARGE=3 ENVIRONMENT_SIZE_LARGE value + */ + EnvironmentConfig.EnvironmentSize = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENVIRONMENT_SIZE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENVIRONMENT_SIZE_SMALL"] = 1; + values[valuesById[2] = "ENVIRONMENT_SIZE_MEDIUM"] = 2; + values[valuesById[3] = "ENVIRONMENT_SIZE_LARGE"] = 3; + return values; + })(); + + return EnvironmentConfig; + })(); + + v1beta1.WebServerNetworkAccessControl = (function() { + + /** + * Properties of a WebServerNetworkAccessControl. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IWebServerNetworkAccessControl + * @property {Array.|null} [allowedIpRanges] WebServerNetworkAccessControl allowedIpRanges + */ + + /** + * Constructs a new WebServerNetworkAccessControl. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a WebServerNetworkAccessControl. + * @implements IWebServerNetworkAccessControl + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl=} [properties] Properties to set + */ + function WebServerNetworkAccessControl(properties) { + this.allowedIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerNetworkAccessControl allowedIpRanges. + * @member {Array.} allowedIpRanges + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @instance + */ + WebServerNetworkAccessControl.prototype.allowedIpRanges = $util.emptyArray; + + /** + * Creates a new WebServerNetworkAccessControl instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl instance + */ + WebServerNetworkAccessControl.create = function create(properties) { + return new WebServerNetworkAccessControl(properties); + }; + + /** + * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerNetworkAccessControl.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedIpRanges != null && message.allowedIpRanges.length) + for (var i = 0; i < message.allowedIpRanges.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.encode(message.allowedIpRanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerNetworkAccessControl.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerNetworkAccessControl.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedIpRanges && message.allowedIpRanges.length)) + message.allowedIpRanges = []; + message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerNetworkAccessControl.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerNetworkAccessControl message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerNetworkAccessControl.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedIpRanges != null && message.hasOwnProperty("allowedIpRanges")) { + if (!Array.isArray(message.allowedIpRanges)) + return "allowedIpRanges: array expected"; + for (var i = 0; i < message.allowedIpRanges.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify(message.allowedIpRanges[i]); + if (error) + return "allowedIpRanges." + error; + } + } + return null; + }; + + /** + * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + */ + WebServerNetworkAccessControl.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl(); + if (object.allowedIpRanges) { + if (!Array.isArray(object.allowedIpRanges)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.allowedIpRanges: array expected"); + message.allowedIpRanges = []; + for (var i = 0; i < object.allowedIpRanges.length; ++i) { + if (typeof object.allowedIpRanges[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.allowedIpRanges: object expected"); + message.allowedIpRanges[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.fromObject(object.allowedIpRanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} message WebServerNetworkAccessControl + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerNetworkAccessControl.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedIpRanges = []; + if (message.allowedIpRanges && message.allowedIpRanges.length) { + object.allowedIpRanges = []; + for (var j = 0; j < message.allowedIpRanges.length; ++j) + object.allowedIpRanges[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.toObject(message.allowedIpRanges[j], options); + } + return object; + }; + + /** + * Converts this WebServerNetworkAccessControl to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @instance + * @returns {Object.} JSON object + */ + WebServerNetworkAccessControl.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WebServerNetworkAccessControl.AllowedIpRange = (function() { + + /** + * Properties of an AllowedIpRange. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @interface IAllowedIpRange + * @property {string|null} [value] AllowedIpRange value + * @property {string|null} [description] AllowedIpRange description + */ + + /** + * Constructs a new AllowedIpRange. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @classdesc Represents an AllowedIpRange. + * @implements IAllowedIpRange + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set + */ + function AllowedIpRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllowedIpRange value. + * @member {string} value + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + */ + AllowedIpRange.prototype.value = ""; + + /** + * AllowedIpRange description. + * @member {string} description + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + */ + AllowedIpRange.prototype.description = ""; + + /** + * Creates a new AllowedIpRange instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange instance + */ + AllowedIpRange.create = function create(properties) { + return new AllowedIpRange(properties); + }; + + /** + * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedIpRange.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedIpRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedIpRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedIpRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedIpRange message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedIpRange.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an AllowedIpRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + */ + AllowedIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange(); + if (object.value != null) + message.value = String(object.value); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} message AllowedIpRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedIpRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.description = ""; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this AllowedIpRange to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + * @returns {Object.} JSON object + */ + AllowedIpRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AllowedIpRange; + })(); + + return WebServerNetworkAccessControl; + })(); + + v1beta1.SoftwareConfig = (function() { + + /** + * Properties of a SoftwareConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ISoftwareConfig + * @property {string|null} [imageVersion] SoftwareConfig imageVersion + * @property {Object.|null} [airflowConfigOverrides] SoftwareConfig airflowConfigOverrides + * @property {Object.|null} [pypiPackages] SoftwareConfig pypiPackages + * @property {Object.|null} [envVariables] SoftwareConfig envVariables + * @property {string|null} [pythonVersion] SoftwareConfig pythonVersion + */ + + /** + * Constructs a new SoftwareConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a SoftwareConfig. + * @implements ISoftwareConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig=} [properties] Properties to set + */ + function SoftwareConfig(properties) { + this.airflowConfigOverrides = {}; + this.pypiPackages = {}; + this.envVariables = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoftwareConfig imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.imageVersion = ""; + + /** + * SoftwareConfig airflowConfigOverrides. + * @member {Object.} airflowConfigOverrides + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.airflowConfigOverrides = $util.emptyObject; + + /** + * SoftwareConfig pypiPackages. + * @member {Object.} pypiPackages + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.pypiPackages = $util.emptyObject; + + /** + * SoftwareConfig envVariables. + * @member {Object.} envVariables + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.envVariables = $util.emptyObject; + + /** + * SoftwareConfig pythonVersion. + * @member {string} pythonVersion + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.pythonVersion = ""; + + /** + * Creates a new SoftwareConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig instance + */ + SoftwareConfig.create = function create(properties) { + return new SoftwareConfig(properties); + }; + + /** + * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig} message SoftwareConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); + if (message.airflowConfigOverrides != null && Object.hasOwnProperty.call(message, "airflowConfigOverrides")) + for (var keys = Object.keys(message.airflowConfigOverrides), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.airflowConfigOverrides[keys[i]]).ldelim(); + if (message.pypiPackages != null && Object.hasOwnProperty.call(message, "pypiPackages")) + for (var keys = Object.keys(message.pypiPackages), 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.pypiPackages[keys[i]]).ldelim(); + if (message.envVariables != null && Object.hasOwnProperty.call(message, "envVariables")) + for (var keys = Object.keys(message.envVariables), 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.envVariables[keys[i]]).ldelim(); + if (message.pythonVersion != null && Object.hasOwnProperty.call(message, "pythonVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pythonVersion); + return writer; + }; + + /** + * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig} message SoftwareConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.imageVersion = reader.string(); + break; + case 2: + if (message.airflowConfigOverrides === $util.emptyObject) + message.airflowConfigOverrides = {}; + 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.airflowConfigOverrides[key] = value; + break; + case 3: + if (message.pypiPackages === $util.emptyObject) + message.pypiPackages = {}; + 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.pypiPackages[key] = value; + break; + case 4: + if (message.envVariables === $util.emptyObject) + message.envVariables = {}; + 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.envVariables[key] = value; + break; + case 6: + message.pythonVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoftwareConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwareConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.airflowConfigOverrides != null && message.hasOwnProperty("airflowConfigOverrides")) { + if (!$util.isObject(message.airflowConfigOverrides)) + return "airflowConfigOverrides: object expected"; + var key = Object.keys(message.airflowConfigOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.airflowConfigOverrides[key[i]])) + return "airflowConfigOverrides: string{k:string} expected"; + } + if (message.pypiPackages != null && message.hasOwnProperty("pypiPackages")) { + if (!$util.isObject(message.pypiPackages)) + return "pypiPackages: object expected"; + var key = Object.keys(message.pypiPackages); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pypiPackages[key[i]])) + return "pypiPackages: string{k:string} expected"; + } + if (message.envVariables != null && message.hasOwnProperty("envVariables")) { + if (!$util.isObject(message.envVariables)) + return "envVariables: object expected"; + var key = Object.keys(message.envVariables); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.envVariables[key[i]])) + return "envVariables: string{k:string} expected"; + } + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + if (!$util.isString(message.pythonVersion)) + return "pythonVersion: string expected"; + return null; + }; + + /** + * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig + */ + SoftwareConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig(); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.airflowConfigOverrides) { + if (typeof object.airflowConfigOverrides !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.airflowConfigOverrides: object expected"); + message.airflowConfigOverrides = {}; + for (var keys = Object.keys(object.airflowConfigOverrides), i = 0; i < keys.length; ++i) + message.airflowConfigOverrides[keys[i]] = String(object.airflowConfigOverrides[keys[i]]); + } + if (object.pypiPackages) { + if (typeof object.pypiPackages !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.pypiPackages: object expected"); + message.pypiPackages = {}; + for (var keys = Object.keys(object.pypiPackages), i = 0; i < keys.length; ++i) + message.pypiPackages[keys[i]] = String(object.pypiPackages[keys[i]]); + } + if (object.envVariables) { + if (typeof object.envVariables !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.envVariables: object expected"); + message.envVariables = {}; + for (var keys = Object.keys(object.envVariables), i = 0; i < keys.length; ++i) + message.envVariables[keys[i]] = String(object.envVariables[keys[i]]); + } + if (object.pythonVersion != null) + message.pythonVersion = String(object.pythonVersion); + return message; + }; + + /** + * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} message SoftwareConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwareConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.airflowConfigOverrides = {}; + object.pypiPackages = {}; + object.envVariables = {}; + } + if (options.defaults) { + object.imageVersion = ""; + object.pythonVersion = ""; + } + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + var keys2; + if (message.airflowConfigOverrides && (keys2 = Object.keys(message.airflowConfigOverrides)).length) { + object.airflowConfigOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.airflowConfigOverrides[keys2[j]] = message.airflowConfigOverrides[keys2[j]]; + } + if (message.pypiPackages && (keys2 = Object.keys(message.pypiPackages)).length) { + object.pypiPackages = {}; + for (var j = 0; j < keys2.length; ++j) + object.pypiPackages[keys2[j]] = message.pypiPackages[keys2[j]]; + } + if (message.envVariables && (keys2 = Object.keys(message.envVariables)).length) { + object.envVariables = {}; + for (var j = 0; j < keys2.length; ++j) + object.envVariables[keys2[j]] = message.envVariables[keys2[j]]; + } + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + object.pythonVersion = message.pythonVersion; + return object; + }; + + /** + * Converts this SoftwareConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + * @returns {Object.} JSON object + */ + SoftwareConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SoftwareConfig; + })(); + + v1beta1.IPAllocationPolicy = (function() { + + /** + * Properties of a IPAllocationPolicy. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IIPAllocationPolicy + * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases + * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName + * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName + * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock + * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock + */ + + /** + * Constructs a new IPAllocationPolicy. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a IPAllocationPolicy. + * @implements IIPAllocationPolicy + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy=} [properties] Properties to set + */ + function IPAllocationPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IPAllocationPolicy useIpAliases. + * @member {boolean} useIpAliases + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.useIpAliases = false; + + /** + * IPAllocationPolicy clusterSecondaryRangeName. + * @member {string} clusterSecondaryRangeName + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterSecondaryRangeName = ""; + + /** + * IPAllocationPolicy servicesSecondaryRangeName. + * @member {string} servicesSecondaryRangeName + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesSecondaryRangeName = ""; + + /** + * IPAllocationPolicy clusterIpv4CidrBlock. + * @member {string} clusterIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy servicesIpv4CidrBlock. + * @member {string} servicesIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv4CidrBlock = ""; + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy instance + */ + IPAllocationPolicy.create = function create(properties) { + return new IPAllocationPolicy(properties); + }; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); + if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterSecondaryRangeName); + if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.servicesSecondaryRangeName); + if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4CidrBlock); + if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.servicesIpv4CidrBlock); + return writer; + }; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.useIpAliases = reader.bool(); + break; + case 2: + message.clusterSecondaryRangeName = reader.string(); + break; + case 3: + message.servicesSecondaryRangeName = reader.string(); + break; + case 4: + message.clusterIpv4CidrBlock = reader.string(); + break; + case 5: + message.servicesIpv4CidrBlock = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a IPAllocationPolicy message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IPAllocationPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + if (typeof message.useIpAliases !== "boolean") + return "useIpAliases: boolean expected"; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) + if (!$util.isString(message.clusterSecondaryRangeName)) + return "clusterSecondaryRangeName: string expected"; + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) + if (!$util.isString(message.servicesSecondaryRangeName)) + return "servicesSecondaryRangeName: string expected"; + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) + if (!$util.isString(message.clusterIpv4CidrBlock)) + return "clusterIpv4CidrBlock: string expected"; + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) + if (!$util.isString(message.servicesIpv4CidrBlock)) + return "servicesIpv4CidrBlock: string expected"; + return null; + }; + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy + */ + IPAllocationPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy(); + if (object.useIpAliases != null) + message.useIpAliases = Boolean(object.useIpAliases); + if (object.clusterSecondaryRangeName != null) + message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); + if (object.servicesSecondaryRangeName != null) + message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); + if (object.clusterIpv4CidrBlock != null) + message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); + if (object.servicesIpv4CidrBlock != null) + message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); + return message; + }; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} message IPAllocationPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IPAllocationPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useIpAliases = false; + object.clusterSecondaryRangeName = ""; + object.servicesSecondaryRangeName = ""; + object.clusterIpv4CidrBlock = ""; + object.servicesIpv4CidrBlock = ""; + } + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + object.useIpAliases = message.useIpAliases; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) + object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) + object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) + object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) + object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; + return object; + }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + * @returns {Object.} JSON object + */ + IPAllocationPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IPAllocationPolicy; + })(); + + v1beta1.NodeConfig = (function() { + + /** + * Properties of a NodeConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface INodeConfig + * @property {string|null} [location] NodeConfig location + * @property {string|null} [machineType] NodeConfig machineType + * @property {string|null} [network] NodeConfig network + * @property {string|null} [subnetwork] NodeConfig subnetwork + * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb + * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes + * @property {string|null} [serviceAccount] NodeConfig serviceAccount + * @property {Array.|null} [tags] NodeConfig tags + * @property {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null} [ipAllocationPolicy] NodeConfig ipAllocationPolicy + * @property {number|null} [maxPodsPerNode] NodeConfig maxPodsPerNode + */ + + /** + * Constructs a new NodeConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a NodeConfig. + * @implements INodeConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig=} [properties] Properties to set + */ + function NodeConfig(properties) { + this.oauthScopes = []; + 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]]; + } + + /** + * NodeConfig location. + * @member {string} location + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.location = ""; + + /** + * NodeConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.machineType = ""; + + /** + * NodeConfig network. + * @member {string} network + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.network = ""; + + /** + * NodeConfig subnetwork. + * @member {string} subnetwork + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.subnetwork = ""; + + /** + * NodeConfig diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.diskSizeGb = 0; + + /** + * NodeConfig oauthScopes. + * @member {Array.} oauthScopes + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.oauthScopes = $util.emptyArray; + + /** + * NodeConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.serviceAccount = ""; + + /** + * NodeConfig tags. + * @member {Array.} tags + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.tags = $util.emptyArray; + + /** + * NodeConfig ipAllocationPolicy. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.ipAllocationPolicy = null; + + /** + * NodeConfig maxPodsPerNode. + * @member {number} maxPodsPerNode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.maxPodsPerNode = 0; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig instance + */ + NodeConfig.create = function create(properties) { + return new NodeConfig(properties); + }; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.machineType); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subnetwork); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.diskSizeGb); + if (message.oauthScopes != null && message.oauthScopes.length) + for (var i = 0; i < message.oauthScopes.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.oauthScopes[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccount); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); + if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) + $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.maxPodsPerNode); + return writer; + }; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = reader.string(); + break; + case 2: + message.machineType = reader.string(); + break; + case 3: + message.network = reader.string(); + break; + case 4: + message.subnetwork = reader.string(); + break; + case 5: + message.diskSizeGb = reader.int32(); + break; + case 6: + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + case 7: + message.serviceAccount = reader.string(); + break; + case 8: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 9: + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.decode(reader, reader.uint32()); + break; + case 10: + message.maxPodsPerNode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { + if (!Array.isArray(message.oauthScopes)) + return "oauthScopes: array expected"; + for (var i = 0; i < message.oauthScopes.length; ++i) + if (!$util.isString(message.oauthScopes[i])) + return "oauthScopes: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify(message.ipAllocationPolicy); + if (error) + return "ipAllocationPolicy." + error; + } + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) + if (!$util.isInteger(message.maxPodsPerNode)) + return "maxPodsPerNode: integer expected"; + return null; + }; + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig + */ + NodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig(); + if (object.location != null) + message.location = String(object.location); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.oauthScopes) { + if (!Array.isArray(object.oauthScopes)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.oauthScopes: array expected"); + message.oauthScopes = []; + for (var i = 0; i < object.oauthScopes.length; ++i) + message.oauthScopes[i] = String(object.oauthScopes[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.ipAllocationPolicy != null) { + if (typeof object.ipAllocationPolicy !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.ipAllocationPolicy: object expected"); + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); + } + if (object.maxPodsPerNode != null) + message.maxPodsPerNode = object.maxPodsPerNode | 0; + return message; + }; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} message NodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.oauthScopes = []; + object.tags = []; + } + if (options.defaults) { + object.location = ""; + object.machineType = ""; + object.network = ""; + object.subnetwork = ""; + object.diskSizeGb = 0; + object.serviceAccount = ""; + object.ipAllocationPolicy = null; + object.maxPodsPerNode = 0; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.oauthScopes && message.oauthScopes.length) { + object.oauthScopes = []; + for (var j = 0; j < message.oauthScopes.length; ++j) + object.oauthScopes[j] = message.oauthScopes[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + 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.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) + object.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) + object.maxPodsPerNode = message.maxPodsPerNode; + return object; + }; + + /** + * Converts this NodeConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + * @returns {Object.} JSON object + */ + NodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NodeConfig; + })(); + + v1beta1.PrivateClusterConfig = (function() { + + /** + * Properties of a PrivateClusterConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IPrivateClusterConfig + * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint + * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock + * @property {string|null} [masterIpv4ReservedRange] PrivateClusterConfig masterIpv4ReservedRange + */ + + /** + * Constructs a new PrivateClusterConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a PrivateClusterConfig. + * @implements IPrivateClusterConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig=} [properties] Properties to set + */ + function PrivateClusterConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateClusterConfig enablePrivateEndpoint. + * @member {boolean} enablePrivateEndpoint + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.enablePrivateEndpoint = false; + + /** + * PrivateClusterConfig masterIpv4CidrBlock. + * @member {string} masterIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; + + /** + * PrivateClusterConfig masterIpv4ReservedRange. + * @member {string} masterIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4ReservedRange = ""; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig instance + */ + PrivateClusterConfig.create = function create(properties) { + return new PrivateClusterConfig(properties); + }; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEndpoint); + if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.masterIpv4CidrBlock); + if (message.masterIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "masterIpv4ReservedRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4ReservedRange); + return writer; + }; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enablePrivateEndpoint = reader.bool(); + break; + case 2: + message.masterIpv4CidrBlock = reader.string(); + break; + case 3: + message.masterIpv4ReservedRange = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateClusterConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateClusterConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + if (typeof message.enablePrivateEndpoint !== "boolean") + return "enablePrivateEndpoint: boolean expected"; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + if (!$util.isString(message.masterIpv4CidrBlock)) + return "masterIpv4CidrBlock: string expected"; + if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) + if (!$util.isString(message.masterIpv4ReservedRange)) + return "masterIpv4ReservedRange: string expected"; + return null; + }; + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig + */ + PrivateClusterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig(); + if (object.enablePrivateEndpoint != null) + message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); + if (object.masterIpv4CidrBlock != null) + message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); + if (object.masterIpv4ReservedRange != null) + message.masterIpv4ReservedRange = String(object.masterIpv4ReservedRange); + return message; + }; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} message PrivateClusterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateClusterConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateEndpoint = false; + object.masterIpv4CidrBlock = ""; + object.masterIpv4ReservedRange = ""; + } + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + object.enablePrivateEndpoint = message.enablePrivateEndpoint; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; + if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) + object.masterIpv4ReservedRange = message.masterIpv4ReservedRange; + return object; + }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateClusterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivateClusterConfig; + })(); + + v1beta1.PrivateEnvironmentConfig = (function() { + + /** + * Properties of a PrivateEnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IPrivateEnvironmentConfig + * @property {boolean|null} [enablePrivateEnvironment] PrivateEnvironmentConfig enablePrivateEnvironment + * @property {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null} [privateClusterConfig] PrivateEnvironmentConfig privateClusterConfig + * @property {string|null} [webServerIpv4CidrBlock] PrivateEnvironmentConfig webServerIpv4CidrBlock + * @property {string|null} [cloudSqlIpv4CidrBlock] PrivateEnvironmentConfig cloudSqlIpv4CidrBlock + * @property {string|null} [webServerIpv4ReservedRange] PrivateEnvironmentConfig webServerIpv4ReservedRange + * @property {string|null} [cloudComposerNetworkIpv4CidrBlock] PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock + * @property {string|null} [cloudComposerNetworkIpv4ReservedRange] PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange + */ + + /** + * Constructs a new PrivateEnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a PrivateEnvironmentConfig. + * @implements IPrivateEnvironmentConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig=} [properties] Properties to set + */ + function PrivateEnvironmentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateEnvironmentConfig enablePrivateEnvironment. + * @member {boolean} enablePrivateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.enablePrivateEnvironment = false; + + /** + * PrivateEnvironmentConfig privateClusterConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null|undefined} privateClusterConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.privateClusterConfig = null; + + /** + * PrivateEnvironmentConfig webServerIpv4CidrBlock. + * @member {string} webServerIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.webServerIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. + * @member {string} cloudSqlIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudSqlIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig webServerIpv4ReservedRange. + * @member {string} webServerIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.webServerIpv4ReservedRange = ""; + + /** + * PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. + * @member {string} cloudComposerNetworkIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. + * @member {string} cloudComposerNetworkIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4ReservedRange = ""; + + /** + * Creates a new PrivateEnvironmentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig instance + */ + PrivateEnvironmentConfig.create = function create(properties) { + return new PrivateEnvironmentConfig(properties); + }; + + /** + * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateEnvironmentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateEnvironment != null && Object.hasOwnProperty.call(message, "enablePrivateEnvironment")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEnvironment); + if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.webServerIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "webServerIpv4CidrBlock")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.webServerIpv4CidrBlock); + if (message.cloudSqlIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudSqlIpv4CidrBlock")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cloudSqlIpv4CidrBlock); + if (message.webServerIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "webServerIpv4ReservedRange")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.webServerIpv4ReservedRange); + if (message.cloudComposerNetworkIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4CidrBlock")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudComposerNetworkIpv4CidrBlock); + if (message.cloudComposerNetworkIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4ReservedRange")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudComposerNetworkIpv4ReservedRange); + return writer; + }; + + /** + * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateEnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateEnvironmentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enablePrivateEnvironment = reader.bool(); + break; + case 2: + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + case 3: + message.webServerIpv4CidrBlock = reader.string(); + break; + case 4: + message.cloudSqlIpv4CidrBlock = reader.string(); + break; + case 5: + message.webServerIpv4ReservedRange = reader.string(); + break; + case 7: + message.cloudComposerNetworkIpv4CidrBlock = reader.string(); + break; + case 8: + message.cloudComposerNetworkIpv4ReservedRange = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateEnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateEnvironmentConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateEnvironmentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) + if (typeof message.enablePrivateEnvironment !== "boolean") + return "enablePrivateEnvironment: boolean expected"; + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify(message.privateClusterConfig); + if (error) + return "privateClusterConfig." + error; + } + if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) + if (!$util.isString(message.webServerIpv4CidrBlock)) + return "webServerIpv4CidrBlock: string expected"; + if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) + if (!$util.isString(message.cloudSqlIpv4CidrBlock)) + return "cloudSqlIpv4CidrBlock: string expected"; + if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) + if (!$util.isString(message.webServerIpv4ReservedRange)) + return "webServerIpv4ReservedRange: string expected"; + if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) + if (!$util.isString(message.cloudComposerNetworkIpv4CidrBlock)) + return "cloudComposerNetworkIpv4CidrBlock: string expected"; + if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) + if (!$util.isString(message.cloudComposerNetworkIpv4ReservedRange)) + return "cloudComposerNetworkIpv4ReservedRange: string expected"; + return null; + }; + + /** + * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + */ + PrivateEnvironmentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig(); + if (object.enablePrivateEnvironment != null) + message.enablePrivateEnvironment = Boolean(object.enablePrivateEnvironment); + if (object.privateClusterConfig != null) { + if (typeof object.privateClusterConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.privateClusterConfig: object expected"); + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.fromObject(object.privateClusterConfig); + } + if (object.webServerIpv4CidrBlock != null) + message.webServerIpv4CidrBlock = String(object.webServerIpv4CidrBlock); + if (object.cloudSqlIpv4CidrBlock != null) + message.cloudSqlIpv4CidrBlock = String(object.cloudSqlIpv4CidrBlock); + if (object.webServerIpv4ReservedRange != null) + message.webServerIpv4ReservedRange = String(object.webServerIpv4ReservedRange); + if (object.cloudComposerNetworkIpv4CidrBlock != null) + message.cloudComposerNetworkIpv4CidrBlock = String(object.cloudComposerNetworkIpv4CidrBlock); + if (object.cloudComposerNetworkIpv4ReservedRange != null) + message.cloudComposerNetworkIpv4ReservedRange = String(object.cloudComposerNetworkIpv4ReservedRange); + return message; + }; + + /** + * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} message PrivateEnvironmentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateEnvironmentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateEnvironment = false; + object.privateClusterConfig = null; + object.webServerIpv4CidrBlock = ""; + object.cloudSqlIpv4CidrBlock = ""; + object.webServerIpv4ReservedRange = ""; + object.cloudComposerNetworkIpv4CidrBlock = ""; + object.cloudComposerNetworkIpv4ReservedRange = ""; + } + if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) + object.enablePrivateEnvironment = message.enablePrivateEnvironment; + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) + object.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); + if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) + object.webServerIpv4CidrBlock = message.webServerIpv4CidrBlock; + if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) + object.cloudSqlIpv4CidrBlock = message.cloudSqlIpv4CidrBlock; + if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) + object.webServerIpv4ReservedRange = message.webServerIpv4ReservedRange; + if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) + object.cloudComposerNetworkIpv4CidrBlock = message.cloudComposerNetworkIpv4CidrBlock; + if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) + object.cloudComposerNetworkIpv4ReservedRange = message.cloudComposerNetworkIpv4ReservedRange; + return object; + }; + + /** + * Converts this PrivateEnvironmentConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateEnvironmentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivateEnvironmentConfig; + })(); + + v1beta1.DatabaseConfig = (function() { + + /** + * Properties of a DatabaseConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDatabaseConfig + * @property {string|null} [machineType] DatabaseConfig machineType + */ + + /** + * Constructs a new DatabaseConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DatabaseConfig. + * @implements IDatabaseConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig=} [properties] Properties to set + */ + function DatabaseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @instance + */ + DatabaseConfig.prototype.machineType = ""; + + /** + * Creates a new DatabaseConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig instance + */ + DatabaseConfig.create = function create(properties) { + return new DatabaseConfig(properties); + }; + + /** + * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig} message DatabaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + return writer; + }; + + /** + * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig} message DatabaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.machineType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + return null; + }; + + /** + * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig + */ + DatabaseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + return message; + }; + + /** + * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} message DatabaseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.machineType = ""; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + return object; + }; + + /** + * Converts this DatabaseConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @instance + * @returns {Object.} JSON object + */ + DatabaseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DatabaseConfig; + })(); + + v1beta1.WebServerConfig = (function() { + + /** + * Properties of a WebServerConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IWebServerConfig + * @property {string|null} [machineType] WebServerConfig machineType + */ + + /** + * Constructs a new WebServerConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a WebServerConfig. + * @implements IWebServerConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig=} [properties] Properties to set + */ + function WebServerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @instance + */ + WebServerConfig.prototype.machineType = ""; + + /** + * Creates a new WebServerConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig instance + */ + WebServerConfig.create = function create(properties) { + return new WebServerConfig(properties); + }; + + /** + * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig} message WebServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + return writer; + }; + + /** + * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig} message WebServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.machineType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + return null; + }; + + /** + * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig + */ + WebServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + return message; + }; + + /** + * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} message WebServerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.machineType = ""; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + return object; + }; + + /** + * Converts this WebServerConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @instance + * @returns {Object.} JSON object + */ + WebServerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WebServerConfig; + })(); + + v1beta1.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kmsKeyName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EncryptionConfig; + })(); + + v1beta1.MaintenanceWindow = (function() { + + /** + * Properties of a MaintenanceWindow. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IMaintenanceWindow + * @property {google.protobuf.ITimestamp|null} [startTime] MaintenanceWindow startTime + * @property {google.protobuf.ITimestamp|null} [endTime] MaintenanceWindow endTime + * @property {string|null} [recurrence] MaintenanceWindow recurrence + */ + + /** + * Constructs a new MaintenanceWindow. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a MaintenanceWindow. + * @implements IMaintenanceWindow + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow=} [properties] Properties to set + */ + function MaintenanceWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenanceWindow startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.startTime = null; + + /** + * MaintenanceWindow endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.endTime = null; + + /** + * MaintenanceWindow recurrence. + * @member {string} recurrence + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.recurrence = ""; + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow instance + */ + MaintenanceWindow.create = function create(properties) { + return new MaintenanceWindow(properties); + }; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.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(); + if (message.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.recurrence); + return writer; + }; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow(); + 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 3: + message.recurrence = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenanceWindow message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenanceWindow.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; + } + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + if (!$util.isString(message.recurrence)) + return "recurrence: string expected"; + return null; + }; + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow + */ + MaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.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.orchestration.airflow.service.v1beta1.MaintenanceWindow.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.recurrence != null) + message.recurrence = String(object.recurrence); + return message; + }; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} message MaintenanceWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenanceWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.recurrence = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + object.recurrence = message.recurrence; + return object; + }; + + /** + * Converts this MaintenanceWindow to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @instance + * @returns {Object.} JSON object + */ + MaintenanceWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MaintenanceWindow; + })(); + + v1beta1.WorkloadsConfig = (function() { + + /** + * Properties of a WorkloadsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IWorkloadsConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null} [scheduler] WorkloadsConfig scheduler + * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null} [webServer] WorkloadsConfig webServer + * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null} [worker] WorkloadsConfig worker + */ + + /** + * Constructs a new WorkloadsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a WorkloadsConfig. + * @implements IWorkloadsConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig=} [properties] Properties to set + */ + function WorkloadsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadsConfig scheduler. + * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null|undefined} scheduler + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.scheduler = null; + + /** + * WorkloadsConfig webServer. + * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null|undefined} webServer + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.webServer = null; + + /** + * WorkloadsConfig worker. + * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null|undefined} worker + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.worker = null; + + /** + * Creates a new WorkloadsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig instance + */ + WorkloadsConfig.create = function create(properties) { + return new WorkloadsConfig(properties); + }; + + /** + * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scheduler != null && Object.hasOwnProperty.call(message, "scheduler")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.encode(message.scheduler, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.webServer != null && Object.hasOwnProperty.call(message, "webServer")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.encode(message.webServer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.worker != null && Object.hasOwnProperty.call(message, "worker")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.encode(message.worker, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.decode(reader, reader.uint32()); + break; + case 2: + message.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.decode(reader, reader.uint32()); + break; + case 3: + message.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadsConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scheduler != null && message.hasOwnProperty("scheduler")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify(message.scheduler); + if (error) + return "scheduler." + error; + } + if (message.webServer != null && message.hasOwnProperty("webServer")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify(message.webServer); + if (error) + return "webServer." + error; + } + if (message.worker != null && message.hasOwnProperty("worker")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify(message.worker); + if (error) + return "worker." + error; + } + return null; + }; + + /** + * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig + */ + WorkloadsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig(); + if (object.scheduler != null) { + if (typeof object.scheduler !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.scheduler: object expected"); + message.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.fromObject(object.scheduler); + } + if (object.webServer != null) { + if (typeof object.webServer !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.webServer: object expected"); + message.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.fromObject(object.webServer); + } + if (object.worker != null) { + if (typeof object.worker !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.worker: object expected"); + message.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.fromObject(object.worker); + } + return message; + }; + + /** + * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} message WorkloadsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scheduler = null; + object.webServer = null; + object.worker = null; + } + if (message.scheduler != null && message.hasOwnProperty("scheduler")) + object.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.toObject(message.scheduler, options); + if (message.webServer != null && message.hasOwnProperty("webServer")) + object.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.toObject(message.webServer, options); + if (message.worker != null && message.hasOwnProperty("worker")) + object.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.toObject(message.worker, options); + return object; + }; + + /** + * Converts this WorkloadsConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WorkloadsConfig.SchedulerResource = (function() { + + /** + * Properties of a SchedulerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @interface ISchedulerResource + * @property {number|null} [cpu] SchedulerResource cpu + * @property {number|null} [memoryGb] SchedulerResource memoryGb + * @property {number|null} [storageGb] SchedulerResource storageGb + * @property {number|null} [count] SchedulerResource count + */ + + /** + * Constructs a new SchedulerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @classdesc Represents a SchedulerResource. + * @implements ISchedulerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set + */ + function SchedulerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchedulerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.cpu = 0; + + /** + * SchedulerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.memoryGb = 0; + + /** + * SchedulerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.storageGb = 0; + + /** + * SchedulerResource count. + * @member {number} count + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.count = 0; + + /** + * Creates a new SchedulerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource instance + */ + SchedulerResource.create = function create(properties) { + return new SchedulerResource(properties); + }; + + /** + * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); + return writer; + }; + + /** + * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cpu = reader.float(); + break; + case 2: + message.memoryGb = reader.float(); + break; + case 3: + message.storageGb = reader.float(); + break; + case 4: + message.count = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchedulerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchedulerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + return null; + }; + + /** + * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource + */ + SchedulerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + if (object.count != null) + message.count = object.count | 0; + return message; + }; + + /** + * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} message SchedulerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchedulerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + object.count = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + return object; + }; + + /** + * Converts this SchedulerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + * @returns {Object.} JSON object + */ + SchedulerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SchedulerResource; + })(); + + WorkloadsConfig.WebServerResource = (function() { + + /** + * Properties of a WebServerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @interface IWebServerResource + * @property {number|null} [cpu] WebServerResource cpu + * @property {number|null} [memoryGb] WebServerResource memoryGb + * @property {number|null} [storageGb] WebServerResource storageGb + */ + + /** + * Constructs a new WebServerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @classdesc Represents a WebServerResource. + * @implements IWebServerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set + */ + function WebServerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.cpu = 0; + + /** + * WebServerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.memoryGb = 0; + + /** + * WebServerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.storageGb = 0; + + /** + * Creates a new WebServerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource instance + */ + WebServerResource.create = function create(properties) { + return new WebServerResource(properties); + }; + + /** + * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + return writer; + }; + + /** + * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cpu = reader.float(); + break; + case 2: + message.memoryGb = reader.float(); + break; + case 3: + message.storageGb = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + return null; + }; + + /** + * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource + */ + WebServerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + return message; + }; + + /** + * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} message WebServerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + return object; + }; + + /** + * Converts this WebServerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @instance + * @returns {Object.} JSON object + */ + WebServerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WebServerResource; + })(); + + WorkloadsConfig.WorkerResource = (function() { + + /** + * Properties of a WorkerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @interface IWorkerResource + * @property {number|null} [cpu] WorkerResource cpu + * @property {number|null} [memoryGb] WorkerResource memoryGb + * @property {number|null} [storageGb] WorkerResource storageGb + * @property {number|null} [minCount] WorkerResource minCount + * @property {number|null} [maxCount] WorkerResource maxCount + */ + + /** + * Constructs a new WorkerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @classdesc Represents a WorkerResource. + * @implements IWorkerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set + */ + function WorkerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.cpu = 0; + + /** + * WorkerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.memoryGb = 0; + + /** + * WorkerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.storageGb = 0; + + /** + * WorkerResource minCount. + * @member {number} minCount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.minCount = 0; + + /** + * WorkerResource maxCount. + * @member {number} maxCount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.maxCount = 0; + + /** + * Creates a new WorkerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource instance + */ + WorkerResource.create = function create(properties) { + return new WorkerResource(properties); + }; + + /** + * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + if (message.minCount != null && Object.hasOwnProperty.call(message, "minCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minCount); + if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxCount); + return writer; + }; + + /** + * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cpu = reader.float(); + break; + case 2: + message.memoryGb = reader.float(); + break; + case 3: + message.storageGb = reader.float(); + break; + case 4: + message.minCount = reader.int32(); + break; + case 5: + message.maxCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + if (message.minCount != null && message.hasOwnProperty("minCount")) + if (!$util.isInteger(message.minCount)) + return "minCount: integer expected"; + if (message.maxCount != null && message.hasOwnProperty("maxCount")) + if (!$util.isInteger(message.maxCount)) + return "maxCount: integer expected"; + return null; + }; + + /** + * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource + */ + WorkerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + if (object.minCount != null) + message.minCount = object.minCount | 0; + if (object.maxCount != null) + message.maxCount = object.maxCount | 0; + return message; + }; + + /** + * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} message WorkerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + object.minCount = 0; + object.maxCount = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + if (message.minCount != null && message.hasOwnProperty("minCount")) + object.minCount = message.minCount; + if (message.maxCount != null && message.hasOwnProperty("maxCount")) + object.maxCount = message.maxCount; + return object; + }; + + /** + * Converts this WorkerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + * @returns {Object.} JSON object + */ + WorkerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WorkerResource; + })(); + + return WorkloadsConfig; + })(); + + v1beta1.Environment = (function() { + + /** + * Properties of an Environment. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null} [config] Environment config + * @property {string|null} [uuid] Environment uuid + * @property {google.cloud.orchestration.airflow.service.v1beta1.Environment.State|null} [state] Environment state + * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {Object.|null} [labels] Environment labels + */ + + /** + * Constructs a new Environment. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an Environment. + * @implements IEnvironment + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment=} [properties] Properties to set + */ + function Environment(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]]; + } + + /** + * Environment name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.name = ""; + + /** + * Environment config. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null|undefined} config + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.config = null; + + /** + * Environment uuid. + * @member {string} uuid + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.uuid = ""; + + /** + * Environment state. + * @member {google.cloud.orchestration.airflow.service.v1beta1.Environment.State} state + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.state = 0; + + /** + * Environment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.createTime = null; + + /** + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.updateTime = null; + + /** + * Environment labels. + * @member {Object.} labels + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.labels = $util.emptyObject; + + /** + * Creates a new Environment instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment instance + */ + Environment.create = function create(properties) { + return new Environment(properties); + }; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uuid); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.Environment(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.decode(reader, reader.uint32()); + break; + case 3: + message.uuid = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment + */ + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.Environment) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.config: object expected"); + message.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.fromObject(object.config); + } + if (object.uuid != null) + message.uuid = String(object.uuid); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + object.uuid = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.toObject(message.config, options); + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this Environment to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + * @returns {Object.} JSON object + */ + Environment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.Environment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} ERROR=5 ERROR value + */ + Environment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return Environment; + })(); + + v1beta1.CheckUpgradeRequest = (function() { + + /** + * Properties of a CheckUpgradeRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICheckUpgradeRequest + * @property {string|null} [environment] CheckUpgradeRequest environment + * @property {string|null} [imageVersion] CheckUpgradeRequest imageVersion + */ + + /** + * Constructs a new CheckUpgradeRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CheckUpgradeRequest. + * @implements ICheckUpgradeRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest=} [properties] Properties to set + */ + function CheckUpgradeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckUpgradeRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @instance + */ + CheckUpgradeRequest.prototype.environment = ""; + + /** + * CheckUpgradeRequest imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @instance + */ + CheckUpgradeRequest.prototype.imageVersion = ""; + + /** + * Creates a new CheckUpgradeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest instance + */ + CheckUpgradeRequest.create = function create(properties) { + return new CheckUpgradeRequest(properties); + }; + + /** + * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageVersion); + return writer; + }; + + /** + * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.environment = reader.string(); + break; + case 2: + message.imageVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckUpgradeRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckUpgradeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + return null; + }; + + /** + * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest + */ + CheckUpgradeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + return message; + }; + + /** + * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} message CheckUpgradeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckUpgradeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.imageVersion = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + return object; + }; + + /** + * Converts this CheckUpgradeRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @instance + * @returns {Object.} JSON object + */ + CheckUpgradeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CheckUpgradeRequest; + })(); + + v1beta1.CheckUpgradeResponse = (function() { + + /** + * Properties of a CheckUpgradeResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICheckUpgradeResponse + * @property {string|null} [buildLogUri] CheckUpgradeResponse buildLogUri + * @property {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|null} [containsPypiModulesConflict] CheckUpgradeResponse containsPypiModulesConflict + * @property {string|null} [pypiConflictBuildLogExtract] CheckUpgradeResponse pypiConflictBuildLogExtract + * @property {string|null} [imageVersion] CheckUpgradeResponse imageVersion + * @property {Object.|null} [pypiDependencies] CheckUpgradeResponse pypiDependencies + */ + + /** + * Constructs a new CheckUpgradeResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CheckUpgradeResponse. + * @implements ICheckUpgradeResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse=} [properties] Properties to set + */ + function CheckUpgradeResponse(properties) { + this.pypiDependencies = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckUpgradeResponse buildLogUri. + * @member {string} buildLogUri + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.buildLogUri = ""; + + /** + * CheckUpgradeResponse containsPypiModulesConflict. + * @member {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult} containsPypiModulesConflict + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.containsPypiModulesConflict = 0; + + /** + * CheckUpgradeResponse pypiConflictBuildLogExtract. + * @member {string} pypiConflictBuildLogExtract + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.pypiConflictBuildLogExtract = ""; + + /** + * CheckUpgradeResponse imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.imageVersion = ""; + + /** + * CheckUpgradeResponse pypiDependencies. + * @member {Object.} pypiDependencies + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.pypiDependencies = $util.emptyObject; + + /** + * Creates a new CheckUpgradeResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse instance + */ + CheckUpgradeResponse.create = function create(properties) { + return new CheckUpgradeResponse(properties); + }; + + /** + * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buildLogUri != null && Object.hasOwnProperty.call(message, "buildLogUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildLogUri); + if (message.pypiConflictBuildLogExtract != null && Object.hasOwnProperty.call(message, "pypiConflictBuildLogExtract")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pypiConflictBuildLogExtract); + if (message.containsPypiModulesConflict != null && Object.hasOwnProperty.call(message, "containsPypiModulesConflict")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.containsPypiModulesConflict); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageVersion); + if (message.pypiDependencies != null && Object.hasOwnProperty.call(message, "pypiDependencies")) + for (var keys = Object.keys(message.pypiDependencies), 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.pypiDependencies[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.buildLogUri = reader.string(); + break; + case 4: + message.containsPypiModulesConflict = reader.int32(); + break; + case 3: + message.pypiConflictBuildLogExtract = reader.string(); + break; + case 5: + message.imageVersion = reader.string(); + break; + case 6: + if (message.pypiDependencies === $util.emptyObject) + message.pypiDependencies = {}; + 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.pypiDependencies[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckUpgradeResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckUpgradeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) + if (!$util.isString(message.buildLogUri)) + return "buildLogUri: string expected"; + if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) + switch (message.containsPypiModulesConflict) { + default: + return "containsPypiModulesConflict: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) + if (!$util.isString(message.pypiConflictBuildLogExtract)) + return "pypiConflictBuildLogExtract: string expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.pypiDependencies != null && message.hasOwnProperty("pypiDependencies")) { + if (!$util.isObject(message.pypiDependencies)) + return "pypiDependencies: object expected"; + var key = Object.keys(message.pypiDependencies); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pypiDependencies[key[i]])) + return "pypiDependencies: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse + */ + CheckUpgradeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse(); + if (object.buildLogUri != null) + message.buildLogUri = String(object.buildLogUri); + switch (object.containsPypiModulesConflict) { + case "CONFLICT_RESULT_UNSPECIFIED": + case 0: + message.containsPypiModulesConflict = 0; + break; + case "CONFLICT": + case 1: + message.containsPypiModulesConflict = 1; + break; + case "NO_CONFLICT": + case 2: + message.containsPypiModulesConflict = 2; + break; + } + if (object.pypiConflictBuildLogExtract != null) + message.pypiConflictBuildLogExtract = String(object.pypiConflictBuildLogExtract); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.pypiDependencies) { + if (typeof object.pypiDependencies !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.pypiDependencies: object expected"); + message.pypiDependencies = {}; + for (var keys = Object.keys(object.pypiDependencies), i = 0; i < keys.length; ++i) + message.pypiDependencies[keys[i]] = String(object.pypiDependencies[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} message CheckUpgradeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckUpgradeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.pypiDependencies = {}; + if (options.defaults) { + object.buildLogUri = ""; + object.pypiConflictBuildLogExtract = ""; + object.containsPypiModulesConflict = options.enums === String ? "CONFLICT_RESULT_UNSPECIFIED" : 0; + object.imageVersion = ""; + } + if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) + object.buildLogUri = message.buildLogUri; + if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) + object.pypiConflictBuildLogExtract = message.pypiConflictBuildLogExtract; + if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) + object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + var keys2; + if (message.pypiDependencies && (keys2 = Object.keys(message.pypiDependencies)).length) { + object.pypiDependencies = {}; + for (var j = 0; j < keys2.length; ++j) + object.pypiDependencies[keys2[j]] = message.pypiDependencies[keys2[j]]; + } + return object; + }; + + /** + * Converts this CheckUpgradeResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + * @returns {Object.} JSON object + */ + CheckUpgradeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ConflictResult enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult + * @enum {number} + * @property {number} CONFLICT_RESULT_UNSPECIFIED=0 CONFLICT_RESULT_UNSPECIFIED value + * @property {number} CONFLICT=1 CONFLICT value + * @property {number} NO_CONFLICT=2 NO_CONFLICT value + */ + CheckUpgradeResponse.ConflictResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONFLICT_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFLICT"] = 1; + values[valuesById[2] = "NO_CONFLICT"] = 2; + return values; + })(); + + return CheckUpgradeResponse; + })(); + + v1beta1.ImageVersions = (function() { + + /** + * Constructs a new ImageVersions service. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an ImageVersions + * @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 ImageVersions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ImageVersions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageVersions; + + /** + * Creates new ImageVersions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions + * @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 {ImageVersions} RPC service. Useful where requests and/or responses are streamed. + */ + ImageVersions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions#listImageVersions}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions + * @typedef ListImageVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} [response] ListImageVersionsResponse + */ + + /** + * Calls ListImageVersions. + * @function listImageVersions + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersionsCallback} callback Node-style callback called with the error, if any, and ListImageVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ImageVersions.prototype.listImageVersions = function listImageVersions(request, callback) { + return this.rpcCall(listImageVersions, $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse, request, callback); + }, "name", { value: "ListImageVersions" }); + + /** + * Calls ListImageVersions. + * @function listImageVersions + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ImageVersions; + })(); + + v1beta1.ListImageVersionsRequest = (function() { + + /** + * Properties of a ListImageVersionsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListImageVersionsRequest + * @property {string|null} [parent] ListImageVersionsRequest parent + * @property {number|null} [pageSize] ListImageVersionsRequest pageSize + * @property {string|null} [pageToken] ListImageVersionsRequest pageToken + * @property {boolean|null} [includePastReleases] ListImageVersionsRequest includePastReleases + */ + + /** + * Constructs a new ListImageVersionsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListImageVersionsRequest. + * @implements IListImageVersionsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest=} [properties] Properties to set + */ + function ListImageVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImageVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.parent = ""; + + /** + * ListImageVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.pageSize = 0; + + /** + * ListImageVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.pageToken = ""; + + /** + * ListImageVersionsRequest includePastReleases. + * @member {boolean} includePastReleases + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.includePastReleases = false; + + /** + * Creates a new ListImageVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest instance + */ + ListImageVersionsRequest.create = function create(properties) { + return new ListImageVersionsRequest(properties); + }; + + /** + * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsRequest.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.includePastReleases != null && Object.hasOwnProperty.call(message, "includePastReleases")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includePastReleases); + return writer; + }; + + /** + * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest(); + 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.includePastReleases = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImageVersionsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImageVersionsRequest.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.includePastReleases != null && message.hasOwnProperty("includePastReleases")) + if (typeof message.includePastReleases !== "boolean") + return "includePastReleases: boolean expected"; + return null; + }; + + /** + * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest + */ + ListImageVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest(); + 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.includePastReleases != null) + message.includePastReleases = Boolean(object.includePastReleases); + return message; + }; + + /** + * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} message ListImageVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImageVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.includePastReleases = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.includePastReleases != null && message.hasOwnProperty("includePastReleases")) + object.includePastReleases = message.includePastReleases; + return object; + }; + + /** + * Converts this ListImageVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListImageVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListImageVersionsRequest; + })(); + + v1beta1.ListImageVersionsResponse = (function() { + + /** + * Properties of a ListImageVersionsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListImageVersionsResponse + * @property {Array.|null} [imageVersions] ListImageVersionsResponse imageVersions + * @property {string|null} [nextPageToken] ListImageVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListImageVersionsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListImageVersionsResponse. + * @implements IListImageVersionsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse=} [properties] Properties to set + */ + function ListImageVersionsResponse(properties) { + this.imageVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImageVersionsResponse imageVersions. + * @member {Array.} imageVersions + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @instance + */ + ListImageVersionsResponse.prototype.imageVersions = $util.emptyArray; + + /** + * ListImageVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @instance + */ + ListImageVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListImageVersionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse instance + */ + ListImageVersionsResponse.create = function create(properties) { + return new ListImageVersionsResponse(properties); + }; + + /** + * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersions != null && message.imageVersions.length) + for (var i = 0; i < message.imageVersions.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.encode(message.imageVersions[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 ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.imageVersions && message.imageVersions.length)) + message.imageVersions = []; + message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImageVersionsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImageVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersions != null && message.hasOwnProperty("imageVersions")) { + if (!Array.isArray(message.imageVersions)) + return "imageVersions: array expected"; + for (var i = 0; i < message.imageVersions.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify(message.imageVersions[i]); + if (error) + return "imageVersions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse + */ + ListImageVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse(); + if (object.imageVersions) { + if (!Array.isArray(object.imageVersions)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.imageVersions: array expected"); + message.imageVersions = []; + for (var i = 0; i < object.imageVersions.length; ++i) { + if (typeof object.imageVersions[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.imageVersions: object expected"); + message.imageVersions[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.fromObject(object.imageVersions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} message ListImageVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImageVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.imageVersions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.imageVersions && message.imageVersions.length) { + object.imageVersions = []; + for (var j = 0; j < message.imageVersions.length; ++j) + object.imageVersions[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.toObject(message.imageVersions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListImageVersionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListImageVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListImageVersionsResponse; + })(); + + v1beta1.ImageVersion = (function() { + + /** + * Properties of an ImageVersion. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IImageVersion + * @property {string|null} [imageVersionId] ImageVersion imageVersionId + * @property {boolean|null} [isDefault] ImageVersion isDefault + * @property {Array.|null} [supportedPythonVersions] ImageVersion supportedPythonVersions + * @property {google.type.IDate|null} [releaseDate] ImageVersion releaseDate + * @property {boolean|null} [creationDisabled] ImageVersion creationDisabled + * @property {boolean|null} [upgradeDisabled] ImageVersion upgradeDisabled + */ + + /** + * Constructs a new ImageVersion. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an ImageVersion. + * @implements IImageVersion + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion=} [properties] Properties to set + */ + function ImageVersion(properties) { + this.supportedPythonVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageVersion imageVersionId. + * @member {string} imageVersionId + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.imageVersionId = ""; + + /** + * ImageVersion isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.isDefault = false; + + /** + * ImageVersion supportedPythonVersions. + * @member {Array.} supportedPythonVersions + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.supportedPythonVersions = $util.emptyArray; + + /** + * ImageVersion releaseDate. + * @member {google.type.IDate|null|undefined} releaseDate + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.releaseDate = null; + + /** + * ImageVersion creationDisabled. + * @member {boolean} creationDisabled + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.creationDisabled = false; + + /** + * ImageVersion upgradeDisabled. + * @member {boolean} upgradeDisabled + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.upgradeDisabled = false; + + /** + * Creates a new ImageVersion instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion instance + */ + ImageVersion.create = function create(properties) { + return new ImageVersion(properties); + }; + + /** + * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion} message ImageVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersionId != null && Object.hasOwnProperty.call(message, "imageVersionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersionId); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); + if (message.supportedPythonVersions != null && message.supportedPythonVersions.length) + for (var i = 0; i < message.supportedPythonVersions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedPythonVersions[i]); + if (message.releaseDate != null && Object.hasOwnProperty.call(message, "releaseDate")) + $root.google.type.Date.encode(message.releaseDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.creationDisabled != null && Object.hasOwnProperty.call(message, "creationDisabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.creationDisabled); + if (message.upgradeDisabled != null && Object.hasOwnProperty.call(message, "upgradeDisabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.upgradeDisabled); + return writer; + }; + + /** + * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion} message ImageVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.imageVersionId = reader.string(); + break; + case 2: + message.isDefault = reader.bool(); + break; + case 3: + if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) + message.supportedPythonVersions = []; + message.supportedPythonVersions.push(reader.string()); + break; + case 4: + message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + case 5: + message.creationDisabled = reader.bool(); + break; + case 6: + message.upgradeDisabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageVersion message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) + if (!$util.isString(message.imageVersionId)) + return "imageVersionId: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; + if (message.supportedPythonVersions != null && message.hasOwnProperty("supportedPythonVersions")) { + if (!Array.isArray(message.supportedPythonVersions)) + return "supportedPythonVersions: array expected"; + for (var i = 0; i < message.supportedPythonVersions.length; ++i) + if (!$util.isString(message.supportedPythonVersions[i])) + return "supportedPythonVersions: string[] expected"; + } + if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) { + var error = $root.google.type.Date.verify(message.releaseDate); + if (error) + return "releaseDate." + error; + } + if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) + if (typeof message.creationDisabled !== "boolean") + return "creationDisabled: boolean expected"; + if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) + if (typeof message.upgradeDisabled !== "boolean") + return "upgradeDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ImageVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion + */ + ImageVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion(); + if (object.imageVersionId != null) + message.imageVersionId = String(object.imageVersionId); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); + if (object.supportedPythonVersions) { + if (!Array.isArray(object.supportedPythonVersions)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.supportedPythonVersions: array expected"); + message.supportedPythonVersions = []; + for (var i = 0; i < object.supportedPythonVersions.length; ++i) + message.supportedPythonVersions[i] = String(object.supportedPythonVersions[i]); + } + if (object.releaseDate != null) { + if (typeof object.releaseDate !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.releaseDate: object expected"); + message.releaseDate = $root.google.type.Date.fromObject(object.releaseDate); + } + if (object.creationDisabled != null) + message.creationDisabled = Boolean(object.creationDisabled); + if (object.upgradeDisabled != null) + message.upgradeDisabled = Boolean(object.upgradeDisabled); + return message; + }; + + /** + * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} message ImageVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.supportedPythonVersions = []; + if (options.defaults) { + object.imageVersionId = ""; + object.isDefault = false; + object.releaseDate = null; + object.creationDisabled = false; + object.upgradeDisabled = false; + } + if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) + object.imageVersionId = message.imageVersionId; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; + if (message.supportedPythonVersions && message.supportedPythonVersions.length) { + object.supportedPythonVersions = []; + for (var j = 0; j < message.supportedPythonVersions.length; ++j) + object.supportedPythonVersions[j] = message.supportedPythonVersions[j]; + } + if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) + object.releaseDate = $root.google.type.Date.toObject(message.releaseDate, options); + if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) + object.creationDisabled = message.creationDisabled; + if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) + object.upgradeDisabled = message.upgradeDisabled; + return object; + }; + + /** + * Converts this ImageVersion to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + * @returns {Object.} JSON object + */ + ImageVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImageVersion; + })(); + + v1beta1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IOperationMetadata + * @property {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|null} [state] OperationMetadata state + * @property {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|null} [operationType] OperationMetadata operationType + * @property {string|null} [resource] OperationMetadata resource + * @property {string|null} [resourceUuid] OperationMetadata resourceUuid + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.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 state. + * @member {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State} state + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.state = 0; + + /** + * OperationMetadata operationType. + * @member {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type} operationType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.operationType = 0; + + /** + * OperationMetadata resource. + * @member {string} resource + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resource = ""; + + /** + * OperationMetadata resourceUuid. + * @member {string} resourceUuid + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resourceUuid = ""; + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operationType); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.resourceUuid != null && Object.hasOwnProperty.call(message, "resourceUuid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUuid); + 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.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 OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.operationType = reader.int32(); + break; + case 3: + message.resource = reader.string(); + break; + case 4: + message.resourceUuid = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.operationType != null && message.hasOwnProperty("operationType")) + switch (message.operationType) { + default: + return "operationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) + if (!$util.isString(message.resourceUuid)) + return "resourceUuid: 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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(); + switch (object.state) { + 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 "SUCCESSFUL": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + } + switch (object.operationType) { + case "TYPE_UNSPECIFIED": + case 0: + message.operationType = 0; + break; + case "CREATE": + case 1: + message.operationType = 1; + break; + case "DELETE": + case 2: + message.operationType = 2; + break; + case "UPDATE": + case 3: + message.operationType = 3; + break; + case "CHECK": + case 4: + message.operationType = 4; + break; + } + if (object.resource != null) + message.resource = String(object.resource); + if (object.resourceUuid != null) + message.resourceUuid = String(object.resourceUuid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.resource = ""; + object.resourceUuid = ""; + object.createTime = null; + object.endTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State[message.state] : message.state; + if (message.operationType != null && message.hasOwnProperty("operationType")) + object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type[message.operationType] : message.operationType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) + object.resourceUuid = message.resourceUuid; + 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); + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCESSFUL=3 SUCCESSFUL value + * @property {number} FAILED=4 FAILED value + */ + OperationMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCESSFUL"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + /** + * Type enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} DELETE=2 DELETE value + * @property {number} UPDATE=3 UPDATE value + * @property {number} CHECK=4 CHECK value + */ + OperationMetadata.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "DELETE"] = 2; + values[valuesById[3] = "UPDATE"] = 3; + values[valuesById[4] = "CHECK"] = 4; + return values; + })(); + + return OperationMetadata; + })(); + + return v1beta1; + })(); + + return service; + })(); + + return airflow; + })(); + + return orchestration; + })(); + + 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 + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + 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: + 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; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.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.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.year = reader.int32(); + break; + case 2: + message.month = reader.int32(); + break; + case 3: + message.day = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Date; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.json b/packages/google-cloud-orchestration-airflow-service/protos/protos.json new file mode 100644 index 00000000000..ee126899f6e --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.json @@ -0,0 +1,3259 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "orchestration": { + "nested": { + "airflow": { + "nested": { + "service": { + "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1;service", + "java_multiple_files": true, + "java_package": "com.google.cloud.orchestration.airflow.service.v1", + "java_outer_classname": "OperationsProto" + }, + "nested": { + "Environments": { + "options": { + "(google.api.default_host)": "composer.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/environments", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "parent,environment", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/environments", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "parent,environment" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/environments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/environments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/environments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{name=projects/*/locations/*/environments/*}", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "name,environment,update_mask", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{name=projects/*/locations/*/environments/*}", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "name,environment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/environments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + } + } + }, + "CreateEnvironmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "environment": { + "type": "Environment", + "id": 2 + } + } + }, + "GetEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListEnvironmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListEnvironmentsResponse": { + "fields": { + "environments": { + "rule": "repeated", + "type": "Environment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "UpdateEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 2 + }, + "environment": { + "type": "Environment", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "EnvironmentConfig": { + "fields": { + "gkeCluster": { + "type": "string", + "id": 1 + }, + "dagGcsPrefix": { + "type": "string", + "id": 2 + }, + "nodeCount": { + "type": "int32", + "id": 3 + }, + "softwareConfig": { + "type": "SoftwareConfig", + "id": 4 + }, + "nodeConfig": { + "type": "NodeConfig", + "id": 5 + }, + "privateEnvironmentConfig": { + "type": "PrivateEnvironmentConfig", + "id": 7 + }, + "webServerNetworkAccessControl": { + "type": "WebServerNetworkAccessControl", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseConfig": { + "type": "DatabaseConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerConfig": { + "type": "WebServerConfig", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "airflowUri": { + "type": "string", + "id": 6 + } + } + }, + "WebServerNetworkAccessControl": { + "fields": { + "allowedIpRanges": { + "rule": "repeated", + "type": "AllowedIpRange", + "id": 1 + } + }, + "nested": { + "AllowedIpRange": { + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "DatabaseConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WebServerConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EncryptionConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SoftwareConfig": { + "fields": { + "imageVersion": { + "type": "string", + "id": 1 + }, + "airflowConfigOverrides": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "pypiPackages": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "envVariables": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "pythonVersion": { + "type": "string", + "id": 6 + } + } + }, + "IPAllocationPolicy": { + "oneofs": { + "clusterIpAllocation": { + "oneof": [ + "clusterSecondaryRangeName", + "clusterIpv4CidrBlock" + ] + }, + "servicesIpAllocation": { + "oneof": [ + "servicesSecondaryRangeName", + "servicesIpv4CidrBlock" + ] + } + }, + "fields": { + "useIpAliases": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clusterSecondaryRangeName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clusterIpv4CidrBlock": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "servicesSecondaryRangeName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "servicesIpv4CidrBlock": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NodeConfig": { + "fields": { + "location": { + "type": "string", + "id": 1 + }, + "machineType": { + "type": "string", + "id": 2 + }, + "network": { + "type": "string", + "id": 3 + }, + "subnetwork": { + "type": "string", + "id": 4 + }, + "diskSizeGb": { + "type": "int32", + "id": 5 + }, + "oauthScopes": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "serviceAccount": { + "type": "string", + "id": 7 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "ipAllocationPolicy": { + "type": "IPAllocationPolicy", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PrivateClusterConfig": { + "fields": { + "enablePrivateEndpoint": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterIpv4CidrBlock": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterIpv4ReservedRange": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "PrivateEnvironmentConfig": { + "fields": { + "enablePrivateEnvironment": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "privateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerIpv4CidrBlock": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudSqlIpv4CidrBlock": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerIpv4ReservedRange": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Environment": { + "options": { + "(google.api.resource).type": "composer.googleapis.com/Environment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "EnvironmentConfig", + "id": 2 + }, + "uuid": { + "type": "string", + "id": 3 + }, + "state": { + "type": "State", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "RUNNING": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5 + } + } + } + }, + "CheckUpgradeResponse": { + "fields": { + "buildLogUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "containsPypiModulesConflict": { + "type": "ConflictResult", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pypiConflictBuildLogExtract": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "imageVersion": { + "type": "string", + "id": 5 + }, + "pypiDependencies": { + "keyType": "string", + "type": "string", + "id": 6 + } + }, + "nested": { + "ConflictResult": { + "values": { + "CONFLICT_RESULT_UNSPECIFIED": 0, + "CONFLICT": 1, + "NO_CONFLICT": 2 + } + } + } + }, + "ImageVersions": { + "options": { + "(google.api.default_host)": "composer.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListImageVersions": { + "requestType": "ListImageVersionsRequest", + "responseType": "ListImageVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/imageVersions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/imageVersions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListImageVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "includePastReleases": { + "type": "bool", + "id": 4 + } + } + }, + "ListImageVersionsResponse": { + "fields": { + "imageVersions": { + "rule": "repeated", + "type": "ImageVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ImageVersion": { + "fields": { + "imageVersionId": { + "type": "string", + "id": 1 + }, + "isDefault": { + "type": "bool", + "id": 2 + }, + "supportedPythonVersions": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "releaseDate": { + "type": "google.type.Date", + "id": 4 + }, + "creationDisabled": { + "type": "bool", + "id": 5 + }, + "upgradeDisabled": { + "type": "bool", + "id": 6 + } + } + }, + "OperationMetadata": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "operationType": { + "type": "Type", + "id": 2 + }, + "resource": { + "type": "string", + "id": 3 + }, + "resourceUuid": { + "type": "string", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + }, + "nested": { + "State": { + "options": { + "allow_alias": true + }, + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "SUCCEEDED": 3, + "SUCCESSFUL": 3, + "FAILED": 4 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CREATE": 1, + "DELETE": 2, + "UPDATE": 3, + "CHECK": 4 + } + } + } + } + } + }, + "v1beta1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1beta1;service", + "java_multiple_files": true, + "java_package": "com.google.cloud.orchestration.airflow.service.v1beta1", + "java_outer_classname": "OperationsProto" + }, + "nested": { + "Environments": { + "options": { + "(google.api.default_host)": "composer.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/environments", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "parent,environment", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/environments", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "parent,environment" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/environments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/environments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/environments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{name=projects/*/locations/*/environments/*}", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "name,environment,update_mask", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{name=projects/*/locations/*/environments/*}", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "name,environment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/environments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "RestartWebServer": { + "requestType": "RestartWebServerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "CheckUpgrade": { + "requestType": "CheckUpgradeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + } + } + }, + "CreateEnvironmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "environment": { + "type": "Environment", + "id": 2 + } + } + }, + "GetEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListEnvironmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListEnvironmentsResponse": { + "fields": { + "environments": { + "rule": "repeated", + "type": "Environment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "UpdateEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 2 + }, + "environment": { + "type": "Environment", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RestartWebServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "EnvironmentConfig": { + "fields": { + "gkeCluster": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dagGcsPrefix": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nodeCount": { + "type": "int32", + "id": 3 + }, + "softwareConfig": { + "type": "SoftwareConfig", + "id": 4 + }, + "nodeConfig": { + "type": "NodeConfig", + "id": 5 + }, + "privateEnvironmentConfig": { + "type": "PrivateEnvironmentConfig", + "id": 7 + }, + "webServerNetworkAccessControl": { + "type": "WebServerNetworkAccessControl", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseConfig": { + "type": "DatabaseConfig", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerConfig": { + "type": "WebServerConfig", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "airflowUri": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maintenanceWindow": { + "type": "MaintenanceWindow", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "workloadsConfig": { + "type": "WorkloadsConfig", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "environmentSize": { + "type": "EnvironmentSize", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EnvironmentSize": { + "values": { + "ENVIRONMENT_SIZE_UNSPECIFIED": 0, + "ENVIRONMENT_SIZE_SMALL": 1, + "ENVIRONMENT_SIZE_MEDIUM": 2, + "ENVIRONMENT_SIZE_LARGE": 3 + } + } + } + }, + "WebServerNetworkAccessControl": { + "fields": { + "allowedIpRanges": { + "rule": "repeated", + "type": "AllowedIpRange", + "id": 1 + } + }, + "nested": { + "AllowedIpRange": { + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SoftwareConfig": { + "fields": { + "imageVersion": { + "type": "string", + "id": 1 + }, + "airflowConfigOverrides": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pypiPackages": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "envVariables": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonVersion": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "IPAllocationPolicy": { + "fields": { + "useIpAliases": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clusterSecondaryRangeName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "servicesSecondaryRangeName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clusterIpv4CidrBlock": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "servicesIpv4CidrBlock": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NodeConfig": { + "fields": { + "location": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "machineType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "network": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subnetwork": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskSizeGb": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oauthScopes": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serviceAccount": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ipAllocationPolicy": { + "type": "IPAllocationPolicy", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxPodsPerNode": { + "type": "int32", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PrivateClusterConfig": { + "fields": { + "enablePrivateEndpoint": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterIpv4CidrBlock": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterIpv4ReservedRange": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "PrivateEnvironmentConfig": { + "fields": { + "enablePrivateEnvironment": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "privateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerIpv4CidrBlock": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudSqlIpv4CidrBlock": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerIpv4ReservedRange": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudComposerNetworkIpv4CidrBlock": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudComposerNetworkIpv4ReservedRange": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DatabaseConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WebServerConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EncryptionConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MaintenanceWindow": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recurrence": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WorkloadsConfig": { + "fields": { + "scheduler": { + "type": "SchedulerResource", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServer": { + "type": "WebServerResource", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "worker": { + "type": "WorkerResource", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SchedulerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "count": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WebServerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WorkerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "Environment": { + "options": { + "(google.api.resource).type": "composer.googleapis.com/Environment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "EnvironmentConfig", + "id": 2 + }, + "uuid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "RUNNING": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5 + } + } + } + }, + "CheckUpgradeRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "imageVersion": { + "type": "string", + "id": 2 + } + } + }, + "CheckUpgradeResponse": { + "fields": { + "buildLogUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "containsPypiModulesConflict": { + "type": "ConflictResult", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pypiConflictBuildLogExtract": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "imageVersion": { + "type": "string", + "id": 5 + }, + "pypiDependencies": { + "keyType": "string", + "type": "string", + "id": 6 + } + }, + "nested": { + "ConflictResult": { + "values": { + "CONFLICT_RESULT_UNSPECIFIED": 0, + "CONFLICT": 1, + "NO_CONFLICT": 2 + } + } + } + }, + "ImageVersions": { + "options": { + "(google.api.default_host)": "composer.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListImageVersions": { + "requestType": "ListImageVersionsRequest", + "responseType": "ListImageVersionsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/imageVersions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/imageVersions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListImageVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "includePastReleases": { + "type": "bool", + "id": 4 + } + } + }, + "ListImageVersionsResponse": { + "fields": { + "imageVersions": { + "rule": "repeated", + "type": "ImageVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ImageVersion": { + "fields": { + "imageVersionId": { + "type": "string", + "id": 1 + }, + "isDefault": { + "type": "bool", + "id": 2 + }, + "supportedPythonVersions": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "releaseDate": { + "type": "google.type.Date", + "id": 4 + }, + "creationDisabled": { + "type": "bool", + "id": 5 + }, + "upgradeDisabled": { + "type": "bool", + "id": 6 + } + } + }, + "OperationMetadata": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "operationType": { + "type": "Type", + "id": 2 + }, + "resource": { + "type": "string", + "id": 3 + }, + "resourceUuid": { + "type": "string", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "SUCCESSFUL": 3, + "FAILED": 4 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CREATE": 1, + "DELETE": 2, + "UPDATE": 3, + "CHECK": 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 + } + }, + "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": [ + [ + 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 + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/date;date", + "java_multiple_files": true, + "java_outer_classname": "DateProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-orchestration-airflow-service/samples/README.md b/packages/google-cloud-orchestration-airflow-service/samples/README.md new file mode 100644 index 00000000000..11d1af30d0d --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Cloud Composer: Node.js Samples](https://github.com/googleapis/nodejs-orchestration-airflow) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-orchestration-airflow#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-orchestration-airflow/blob/main/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-orchestration-airflow&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-orchestration-airflow&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/composer/docs diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json new file mode 100644 index 00000000000..eac16b53895 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-orchestration-airflow", + "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/orchestration-airflow": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/samples/quickstart.js b/packages/google-cloud-orchestration-airflow-service/samples/quickstart.js new file mode 100644 index 00000000000..0a25b5a2207 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/quickstart.js @@ -0,0 +1,48 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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(projectId = 'my-project-id', location = 'us-central1') { + // [START composer_list_image_versions] + // Imports the Google Cloud client library + + // remove this line after package is released + // eslint-disable-next-line node/no-missing-require + const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow'); + + // 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 ImageVersionsClient(); + + async function listImageVersions() { + const [versions] = await client.listImageVersions({ + parent: `projects/${projectId}/locations/${location}`, + }); + console.info(versions); + } + listImageVersions(); + // [END composer_list_image_versions] +} + +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-orchestration-airflow-service/samples/test/quickstart.js b/packages/google-cloud-orchestration-airflow-service/samples/test/quickstart.js new file mode 100644 index 00000000000..be299d4e4b2 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/test/quickstart.js @@ -0,0 +1,48 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {ImageVersionsClient} = require('@google-cloud/orchestration-airflow'); +// 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 ImageVersionsClient(); + +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 () => { + const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); + assert(stdout, stdout !== null); + }); +}); diff --git a/packages/google-cloud-orchestration-airflow-service/src/index.ts b/packages/google-cloud-orchestration-airflow-service/src/index.ts new file mode 100644 index 00000000000..bcd31aca47c --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/index.ts @@ -0,0 +1,30 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +import * as v1beta1 from './v1beta1'; + +const EnvironmentsClient = v1.EnvironmentsClient; +type EnvironmentsClient = v1.EnvironmentsClient; +const ImageVersionsClient = v1.ImageVersionsClient; +type ImageVersionsClient = v1.ImageVersionsClient; + +export {v1, v1beta1, EnvironmentsClient, ImageVersionsClient}; +export default {v1, v1beta1, EnvironmentsClient, ImageVersionsClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts new file mode 100644 index 00000000000..c2634c244fe --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -0,0 +1,1286 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/environments_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './environments_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * Managed Apache Airflow Environments. + * @class + * @memberof v1 + */ +export class EnvironmentsClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + environmentsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of EnvironmentsClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof EnvironmentsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}' + ), + }; + + // 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 = { + listEnvironments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'environments' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.Environment' + ) as gax.protobuf.Type; + const createEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.Environment' + ) as gax.protobuf.Type; + const updateEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteEnvironmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEnvironmentResponse.decode.bind(createEnvironmentResponse), + createEnvironmentMetadata.decode.bind(createEnvironmentMetadata) + ), + updateEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), + updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata) + ), + deleteEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), + deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.orchestration.airflow.service.v1.Environments', + 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.environmentsStub) { + return this.environmentsStub; + } + + // Put together the "service stub" for + // google.cloud.orchestration.airflow.service.v1.Environments. + this.environmentsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.orchestration.airflow.service.v1.Environments' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.orchestration.airflow.service.v1 + .Environments, + 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 environmentsStubMethods = [ + 'createEnvironment', + 'getEnvironment', + 'listEnvironments', + 'updateEnvironment', + 'deleteEnvironment', + ]; + for (const methodName of environmentsStubMethods) { + const callPromise = this.environmentsStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.environmentsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'composer.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 'composer.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 -- + // ------------------- + getEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + ( + | protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest + | undefined + ), + {} | undefined + ] + >; + getEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + | protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + | protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Get an existing environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. + * 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.getEnvironment(request); + */ + getEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + | protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + | protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + ( + | protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest + | 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.getEnvironment(request, options, callback); + } + + createEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment + * The environment 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 + * const [operation] = await client.createEnvironment(request); + * const [response] = await operation.promise(); + */ + createEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createEnvironment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.Environment, + protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.orchestration.airflow.service.v1.Environment, + protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata + >; + } + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * + * **Note:** Only the following fields can be updated: + * + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.databaseConfig` + * * Replace the environment's current `DatabaseConfig`. + * * `config.webServerConfig` + * * Replace the environment's current `WebServerConfig`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual environment variables. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateEnvironment(request); + * const [response] = await operation.promise(); + */ + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateEnvironment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.Environment, + protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.orchestration.airflow.service.v1.Environment, + protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata + >; + } + deleteEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Delete an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteEnvironment(request); + * const [response] = await operation.promise(); + */ + deleteEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteEnvironment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata + >; + } + listEnvironments( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[], + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest | null, + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse + ] + >; + listEnvironments( + request: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + | protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment + > + ): void; + listEnvironments( + request: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + | protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment + > + ): void; + /** + * List environments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. + * 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 `listEnvironmentsAsync()` + * 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. + */ + listEnvironments( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + | protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment + >, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + | protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment + > + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[], + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest | null, + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse + ] + > | 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.listEnvironments(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 + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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 [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment} 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 `listEnvironmentsAsync()` + * 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. + */ + listEnvironmentsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listEnvironments.createStream( + this.innerApiCalls.listEnvironments as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listEnvironments`, 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 + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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 + * [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. 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.listEnvironmentsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listEnvironmentsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listEnvironments.asyncIterate( + this.innerApiCalls['listEnvironments'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project: string, location: string, environment: string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.environmentsStub!.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client_config.json b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client_config.json new file mode 100644 index 00000000000..337dfdcfb16 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1.Environments": { + "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": { + "CreateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEnvironments": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_proto_list.json b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_proto_list.json new file mode 100644 index 00000000000..674df9932cf --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/orchestration/airflow/service/v1/environments.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1/operations.proto" +] diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/gapic_metadata.json b/packages/google-cloud-orchestration-airflow-service/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..089e0ceae96 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/gapic_metadata.json @@ -0,0 +1,105 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.orchestration.airflow.service.v1", + "libraryPackage": "@google-cloud/orchestration-airflow", + "services": { + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + } + } + } + } + }, + "ImageVersions": { + "clients": { + "grpc": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions", + "listImageVersionsStream", + "listImageVersionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions", + "listImageVersionsStream", + "listImageVersionsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts new file mode 100644 index 00000000000..4156926783f --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -0,0 +1,588 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/image_versions_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './image_versions_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Readonly service to query available ImageVersions. + * @class + * @memberof v1 + */ +export class ImageVersionsClient { + 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}; + imageVersionsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ImageVersionsClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ImageVersionsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}' + ), + }; + + // 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 = { + listImageVersions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'imageVersions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.orchestration.airflow.service.v1.ImageVersions', + 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.imageVersionsStub) { + return this.imageVersionsStub; + } + + // Put together the "service stub" for + // google.cloud.orchestration.airflow.service.v1.ImageVersions. + this.imageVersionsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.orchestration.airflow.service.v1.ImageVersions' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.orchestration.airflow.service.v1 + .ImageVersions, + 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 imageVersionsStubMethods = ['listImageVersions']; + for (const methodName of imageVersionsStubMethods) { + const callPromise = this.imageVersionsStub.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.imageVersionsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'composer.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 'composer.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 -- + // ------------------- + + listImageVersions( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[], + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest | null, + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse + ] + >; + listImageVersions( + request: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + | protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion + > + ): void; + listImageVersions( + request: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + | protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion + > + ): void; + /** + * List ImageVersions for provided location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1.ImageVersion}. + * 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 `listImageVersionsAsync()` + * 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. + */ + listImageVersions( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + | protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion + >, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + | protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion + > + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[], + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest | null, + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse + ] + > | 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.listImageVersions(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 + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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 [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1.ImageVersion} 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 `listImageVersionsAsync()` + * 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. + */ + listImageVersionsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listImageVersions.createStream( + this.innerApiCalls.listImageVersions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listImageVersions`, 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 + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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 + * [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1.ImageVersion}. 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.listImageVersionsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listImageVersionsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listImageVersions.asyncIterate( + this.innerApiCalls['listImageVersions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project: string, location: string, environment: string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.imageVersionsStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client_config.json b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client_config.json new file mode 100644 index 00000000000..6ae2b5fc9c6 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1.ImageVersions": { + "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": { + "ListImageVersions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_proto_list.json b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_proto_list.json new file mode 100644 index 00000000000..674df9932cf --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/orchestration/airflow/service/v1/environments.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1/operations.proto" +] diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/index.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/index.ts new file mode 100644 index 00000000000..1baa9f1bea8 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/index.ts @@ -0,0 +1,20 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {EnvironmentsClient} from './environments_client'; +export {ImageVersionsClient} from './image_versions_client'; diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts new file mode 100644 index 00000000000..f54232ba459 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -0,0 +1,1635 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/environments_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './environments_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * Managed Apache Airflow Environments. + * @class + * @memberof v1beta1 + */ +export class EnvironmentsClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + environmentsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of EnvironmentsClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof EnvironmentsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}' + ), + }; + + // 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 = { + listEnvironments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'environments' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.Environment' + ) as gax.protobuf.Type; + const createEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const updateEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.Environment' + ) as gax.protobuf.Type; + const updateEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteEnvironmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const restartWebServerResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.Environment' + ) as gax.protobuf.Type; + const restartWebServerMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const checkUpgradeResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse' + ) as gax.protobuf.Type; + const checkUpgradeMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEnvironmentResponse.decode.bind(createEnvironmentResponse), + createEnvironmentMetadata.decode.bind(createEnvironmentMetadata) + ), + updateEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), + updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata) + ), + deleteEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), + deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata) + ), + restartWebServer: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restartWebServerResponse.decode.bind(restartWebServerResponse), + restartWebServerMetadata.decode.bind(restartWebServerMetadata) + ), + checkUpgrade: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + checkUpgradeResponse.decode.bind(checkUpgradeResponse), + checkUpgradeMetadata.decode.bind(checkUpgradeMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.orchestration.airflow.service.v1beta1.Environments', + 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.environmentsStub) { + return this.environmentsStub; + } + + // Put together the "service stub" for + // google.cloud.orchestration.airflow.service.v1beta1.Environments. + this.environmentsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.orchestration.airflow.service.v1beta1.Environments' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.orchestration.airflow.service + .v1beta1.Environments, + 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 environmentsStubMethods = [ + 'createEnvironment', + 'getEnvironment', + 'listEnvironments', + 'updateEnvironment', + 'deleteEnvironment', + 'restartWebServer', + 'checkUpgrade', + ]; + for (const methodName of environmentsStubMethods) { + const callPromise = this.environmentsStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.environmentsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'composer.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 'composer.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 -- + // ------------------- + getEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + ( + | protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest + | undefined + ), + {} | undefined + ] + >; + getEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Get an existing environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. + * 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.getEnvironment(request); + */ + getEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + ( + | protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest + | 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.getEnvironment(request, options, callback); + } + + createEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment + * The environment 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 + * const [operation] = await client.createEnvironment(request); + * const [response] = await operation.promise(); + */ + createEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createEnvironment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + >; + } + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * argparse, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.argparse". The included patch + * environment would specify the scikit-learn version as follows: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and argparse will be unaffected. + * + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * + * **Note:** Only the following fields can be updated: + * + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. * `config.webServerNetworkAccessControl` + * * Replace the environment's current WebServerNetworkAccessControl. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual environment variables. + * * `config.softwareConfig.imageVersion` + * * Upgrade the version of the environment in-place. Refer to + * `SoftwareConfig.image_version` for information on how to format the + * new image version. Additionally, the new image version cannot effect + * a version downgrade and must match the current image version's + * Composer major version and Airflow major and minor versions. Consult + * the [Cloud Composer Version + * List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) + * for valid values. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. * `config.maintenanceWindow` + * * Maintenance window during which Cloud Composer components may be + * under maintenance. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateEnvironment(request); + * const [response] = await operation.promise(); + */ + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateEnvironment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + >; + } + deleteEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Delete an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteEnvironment(request); + * const [response] = await operation.promise(); + */ + deleteEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteEnvironment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + >; + } + restartWebServer( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + restartWebServer( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + restartWebServer( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Restart Airflow web server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to restart the web server for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.restartWebServer(request); + * const [response] = await operation.promise(); + */ + restartWebServer( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.restartWebServer(request, options, callback); + } + /** + * Check the status of the long running operation returned by `restartWebServer()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRestartWebServerProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkRestartWebServerProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.restartWebServer, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + >; + } + checkUpgrade( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Check if an upgrade operation on the environment will succeed. + * + * In case of problems detailed info can be found in the returned Operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} request.imageVersion + * The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * + * The Cloud Composer portion of the version is a + * [semantic version](https://semver.org) or `latest`. When the patch version + * is omitted, the current Cloud Composer patch version is selected. + * When `latest` is provided instead of an explicit version number, + * the server replaces `latest` with the current Cloud Composer version + * and stores that version number in the same field. + * + * The portion of the image version that follows `airflow-` is an + * official Apache Airflow repository + * [release name](https://github.com/apache/incubator-airflow/releases). + * + * See also [Version List] + * (/composer/docs/concepts/versioning/composer-versions). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.checkUpgrade(request); + * const [response] = await operation.promise(); + */ + checkUpgrade( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + environment: request.environment || '', + }); + this.initialize(); + return this.innerApiCalls.checkUpgrade(request, options, callback); + } + /** + * Check the status of the long running operation returned by `checkUpgrade()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCheckUpgradeProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCheckUpgradeProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.checkUpgrade, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + >; + } + listEnvironments( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest | null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse + ] + >; + listEnvironments( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment + > + ): void; + listEnvironments( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment + > + ): void; + /** + * List environments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. + * 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 `listEnvironmentsAsync()` + * 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. + */ + listEnvironments( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment + >, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment + > + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest | null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse + ] + > | 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.listEnvironments(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 + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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 [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment} 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 `listEnvironmentsAsync()` + * 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. + */ + listEnvironmentsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listEnvironments.createStream( + this.innerApiCalls.listEnvironments as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listEnvironments`, 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 + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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 + * [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. 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.listEnvironmentsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listEnvironmentsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listEnvironments.asyncIterate( + this.innerApiCalls['listEnvironments'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project: string, location: string, environment: string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.environmentsStub!.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client_config.json b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client_config.json new file mode 100644 index 00000000000..737917512b6 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1beta1.Environments": { + "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": { + "CreateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEnvironments": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestartWebServer": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckUpgrade": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_proto_list.json b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_proto_list.json new file mode 100644 index 00000000000..c854c306722 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto" +] diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/gapic_metadata.json b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..f00b768a35a --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/gapic_metadata.json @@ -0,0 +1,125 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.orchestration.airflow.service.v1beta1", + "libraryPackage": "@google-cloud/orchestration-airflow", + "services": { + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "RestartWebServer": { + "methods": [ + "restartWebServer" + ] + }, + "CheckUpgrade": { + "methods": [ + "checkUpgrade" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "RestartWebServer": { + "methods": [ + "restartWebServer" + ] + }, + "CheckUpgrade": { + "methods": [ + "checkUpgrade" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + } + } + } + } + }, + "ImageVersions": { + "clients": { + "grpc": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions", + "listImageVersionsStream", + "listImageVersionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions", + "listImageVersionsStream", + "listImageVersionsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts new file mode 100644 index 00000000000..dedf4f3f62b --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -0,0 +1,588 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/image_versions_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './image_versions_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Readonly service to query available ImageVersions. + * @class + * @memberof v1beta1 + */ +export class ImageVersionsClient { + 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}; + imageVersionsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ImageVersionsClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ImageVersionsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}' + ), + }; + + // 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 = { + listImageVersions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'imageVersions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.orchestration.airflow.service.v1beta1.ImageVersions', + 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.imageVersionsStub) { + return this.imageVersionsStub; + } + + // Put together the "service stub" for + // google.cloud.orchestration.airflow.service.v1beta1.ImageVersions. + this.imageVersionsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.orchestration.airflow.service.v1beta1.ImageVersions' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.orchestration.airflow.service + .v1beta1.ImageVersions, + 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 imageVersionsStubMethods = ['listImageVersions']; + for (const methodName of imageVersionsStubMethods) { + const callPromise = this.imageVersionsStub.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.imageVersionsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'composer.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 'composer.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 -- + // ------------------- + + listImageVersions( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest | null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse + ] + >; + listImageVersions( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion + > + ): void; + listImageVersions( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion + > + ): void; + /** + * List ImageVersions for provided location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion}. + * 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 `listImageVersionsAsync()` + * 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. + */ + listImageVersions( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion + >, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + | protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse + | null + | undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion + > + ): Promise< + [ + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest | null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse + ] + > | 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.listImageVersions(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 + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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 [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} 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 `listImageVersionsAsync()` + * 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. + */ + listImageVersionsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listImageVersions.createStream( + this.innerApiCalls.listImageVersions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listImageVersions`, 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 + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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 + * [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion}. 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.listImageVersionsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listImageVersionsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listImageVersions.asyncIterate( + this.innerApiCalls['listImageVersions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project: string, location: string, environment: string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.imageVersionsStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client_config.json b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client_config.json new file mode 100644 index 00000000000..9db3275858a --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions": { + "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": { + "ListImageVersions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_proto_list.json b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_proto_list.json new file mode 100644 index 00000000000..c854c306722 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto" +] diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/index.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/index.ts new file mode 100644 index 00000000000..1baa9f1bea8 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/index.ts @@ -0,0 +1,20 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {EnvironmentsClient} from './environments_client'; +export {ImageVersionsClient} from './image_versions_client'; diff --git a/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.js b/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..b616227b1a8 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const service = require('@google-cloud/orchestration-airflow'); + +function main() { + const environmentsClient = new service.EnvironmentsClient(); + const imageVersionsClient = new service.ImageVersionsClient(); +} + +main(); diff --git a/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..23470a37274 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,41 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { + EnvironmentsClient, + ImageVersionsClient, +} from '@google-cloud/orchestration-airflow'; + +// check that the client class type name can be used +function doStuffWithEnvironmentsClient(client: EnvironmentsClient) { + client.close(); +} +function doStuffWithImageVersionsClient(client: ImageVersionsClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const environmentsClient = new EnvironmentsClient(); + doStuffWithEnvironmentsClient(environmentsClient); + // check that the client instance can be created + const imageVersionsClient = new ImageVersionsClient(); + doStuffWithImageVersionsClient(imageVersionsClient); +} + +main(); diff --git a/packages/google-cloud-orchestration-airflow-service/system-test/install.ts b/packages/google-cloud-orchestration-airflow-service/system-test/install.ts new file mode 100644 index 00000000000..d2d61c0396f --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {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-orchestration-airflow-service/test/gapic_environments_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts new file mode 100644 index 00000000000..a59109ddac3 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts @@ -0,0 +1,1301 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as environmentsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.EnvironmentsClient', () => { + it('has servicePath', () => { + const servicePath = environmentsModule.v1.EnvironmentsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = environmentsModule.v1.EnvironmentsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = environmentsModule.v1.EnvironmentsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new environmentsModule.v1.EnvironmentsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + await client.initialize(); + assert(client.environmentsStub); + }); + + it('has close method', () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v1.EnvironmentsClient({ + 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 environmentsModule.v1.EnvironmentsClient({ + 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('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ); + client.innerApiCalls.getEnvironment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getEnvironment with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getEnvironment(request), expectedError); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createEnvironment', () => { + it('invokes createEnvironment without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createEnvironment without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createEnvironment with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createEnvironment(request), expectedError); + assert( + (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createEnvironment with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + 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.checkCreateEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + 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.checkCreateEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateEnvironment', () => { + it('invokes updateEnvironment without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateEnvironment without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateEnvironment with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateEnvironment(request), expectedError); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateEnvironment with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + 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.checkUpdateEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + 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.checkUpdateEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteEnvironment', () => { + it('invokes deleteEnvironment without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteEnvironment without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteEnvironment with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteEnvironment(request), expectedError); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteEnvironment with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + 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.checkDeleteEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + 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.checkDeleteEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listEnvironments', () => { + it('invokes listEnvironments without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + ]; + client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); + const [response] = await client.listEnvironments(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listEnvironments without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + ]; + client.innerApiCalls.listEnvironments = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEnvironments( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listEnvironments with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listEnvironments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listEnvironments(request), expectedError); + assert( + (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listEnvironmentsStream without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + ]; + client.descriptors.page.listEnvironments.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.Environment[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.orchestration.airflow.service.v1.Environment + ) => { + 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.listEnvironments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEnvironments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listEnvironments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listEnvironmentsStream with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.Environment[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.orchestration.airflow.service.v1.Environment + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEnvironments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listEnvironments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listEnvironments without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ), + ]; + client.descriptors.page.listEnvironments.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[] = + []; + const iterable = client.listEnvironmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listEnvironments with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEnvironmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + environment: 'environmentValue', + }; + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts new file mode 100644 index 00000000000..749942b39fb --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts @@ -0,0 +1,1687 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as environmentsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.EnvironmentsClient', () => { + it('has servicePath', () => { + const servicePath = + environmentsModule.v1beta1.EnvironmentsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + environmentsModule.v1beta1.EnvironmentsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = environmentsModule.v1beta1.EnvironmentsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + await client.initialize(); + assert(client.environmentsStub); + }); + + it('has close method', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ); + client.innerApiCalls.getEnvironment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getEnvironment with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getEnvironment(request), expectedError); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createEnvironment', () => { + it('invokes createEnvironment without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createEnvironment without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createEnvironment with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createEnvironment(request), expectedError); + assert( + (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createEnvironment with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkCreateEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkCreateEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateEnvironment', () => { + it('invokes updateEnvironment without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateEnvironment without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateEnvironment with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateEnvironment(request), expectedError); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateEnvironment with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkUpdateEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkUpdateEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteEnvironment', () => { + it('invokes deleteEnvironment without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteEnvironment without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteEnvironment with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteEnvironment(request), expectedError); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteEnvironment with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkDeleteEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkDeleteEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('restartWebServer', () => { + it('invokes restartWebServer without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restartWebServer = + stubLongRunningCall(expectedResponse); + const [operation] = await client.restartWebServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes restartWebServer without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restartWebServer = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restartWebServer( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes restartWebServer with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.restartWebServer = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.restartWebServer(request), expectedError); + assert( + (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes restartWebServer with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.restartWebServer = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.restartWebServer(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkRestartWebServerProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkRestartWebServerProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestartWebServerProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkRestartWebServerProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('checkUpgrade', () => { + it('invokes checkUpgrade without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.checkUpgrade = stubLongRunningCall(expectedResponse); + const [operation] = await client.checkUpgrade(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpgrade without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.checkUpgrade = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkUpgrade( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes checkUpgrade with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.checkUpgrade = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpgrade(request), expectedError); + assert( + (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpgrade with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.checkUpgrade = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.checkUpgrade(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCheckUpgradeProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkCheckUpgradeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCheckUpgradeProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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.checkCheckUpgradeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listEnvironments', () => { + it('invokes listEnvironments without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + ]; + client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); + const [response] = await client.listEnvironments(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listEnvironments without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + ]; + client.innerApiCalls.listEnvironments = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEnvironments( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listEnvironments with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listEnvironments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listEnvironments(request), expectedError); + assert( + (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listEnvironmentsStream without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + ]; + client.descriptors.page.listEnvironments.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment + ) => { + 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.listEnvironments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEnvironments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listEnvironments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listEnvironmentsStream with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEnvironments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listEnvironments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listEnvironments without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ), + ]; + client.descriptors.page.listEnvironments.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[] = + []; + const iterable = client.listEnvironmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listEnvironments with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEnvironmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + environment: 'environmentValue', + }; + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts new file mode 100644 index 00000000000..597e9c345bc --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts @@ -0,0 +1,576 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as imageversionsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ImageVersionsClient', () => { + it('has servicePath', () => { + const servicePath = imageversionsModule.v1.ImageVersionsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = imageversionsModule.v1.ImageVersionsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = imageversionsModule.v1.ImageVersionsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new imageversionsModule.v1.ImageVersionsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + await client.initialize(); + assert(client.imageVersionsStub); + }); + + it('has close method', () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageversionsModule.v1.ImageVersionsClient({ + 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 imageversionsModule.v1.ImageVersionsClient({ + 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('listImageVersions', () => { + it('invokes listImageVersions without error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + ]; + client.innerApiCalls.listImageVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listImageVersions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listImageVersions without error using callback', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + ]; + client.innerApiCalls.listImageVersions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listImageVersions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listImageVersions with error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listImageVersions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listImageVersions(request), expectedError); + assert( + (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listImageVersionsStream without error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + ]; + client.descriptors.page.listImageVersions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listImageVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion + ) => { + 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.listImageVersions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listImageVersions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listImageVersions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listImageVersionsStream with error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listImageVersions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listImageVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listImageVersions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listImageVersions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listImageVersions without error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() + ), + ]; + client.descriptors.page.listImageVersions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[] = + []; + const iterable = client.listImageVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listImageVersions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listImageVersions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listImageVersions with error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listImageVersions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listImageVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listImageVersions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listImageVersions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + environment: 'environmentValue', + }; + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts new file mode 100644 index 00000000000..a0863eb29f0 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts @@ -0,0 +1,578 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as imageversionsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.ImageVersionsClient', () => { + it('has servicePath', () => { + const servicePath = + imageversionsModule.v1beta1.ImageVersionsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + imageversionsModule.v1beta1.ImageVersionsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = imageversionsModule.v1beta1.ImageVersionsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + await client.initialize(); + assert(client.imageVersionsStub); + }); + + it('has close method', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + 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 imageversionsModule.v1beta1.ImageVersionsClient({ + 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('listImageVersions', () => { + it('invokes listImageVersions without error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + ]; + client.innerApiCalls.listImageVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listImageVersions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listImageVersions without error using callback', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + ]; + client.innerApiCalls.listImageVersions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listImageVersions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listImageVersions with error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listImageVersions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listImageVersions(request), expectedError); + assert( + (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listImageVersionsStream without error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + ]; + client.descriptors.page.listImageVersions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listImageVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + ) => { + 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.listImageVersions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listImageVersions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listImageVersions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listImageVersionsStream with error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listImageVersions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listImageVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listImageVersions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listImageVersions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listImageVersions without error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() + ), + ]; + client.descriptors.page.listImageVersions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[] = + []; + const iterable = client.listImageVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listImageVersions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listImageVersions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listImageVersions with error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listImageVersions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listImageVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listImageVersions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listImageVersions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + environment: 'environmentValue', + }; + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-orchestration-airflow-service/tsconfig.json b/packages/google-cloud-orchestration-airflow-service/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/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-orchestration-airflow-service/webpack.config.js b/packages/google-cloud-orchestration-airflow-service/webpack.config.js new file mode 100644 index 00000000000..de75b5ecd2d --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/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: 'Environments', + filename: './environments.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 6d6a7337f7ca9071ce234f2e836f9b039a2ab473 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Sep 2021 13:57:18 -0700 Subject: [PATCH 03/48] chore: release 1.0.0 (#4) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .../CHANGELOG.md | 13 +++++++++++++ .../package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-orchestration-airflow-service/CHANGELOG.md diff --git a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md new file mode 100644 index 00000000000..f3d700427b8 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +## 1.0.0 (2021-09-30) + + +### ⚠ BREAKING CHANGES + +* initial release of orchestration-airflow (#2) + +### Features + +* initial files ([c858e85](https://www.github.com/googleapis/nodejs-orchestration-airflow/commit/c858e85019906ff6741aa1e3033c50050305798c)) +* initial release of orchestration-airflow ([#2](https://www.github.com/googleapis/nodejs-orchestration-airflow/issues/2)) ([bd968d9](https://www.github.com/googleapis/nodejs-orchestration-airflow/commit/bd968d975db183f98c476bc208cae47d37593d54)) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index c17d8e7f64e..0302755518e 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/orchestration-airflow", - "version": "0.1.0", + "version": "1.0.0", "description": "orchestration-airflow client for Node.js", "repository": "googleapis/nodejs-orchestration-airflow", "license": "Apache-2.0", diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json index eac16b53895..e2af3c263db 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/package.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/orchestration-airflow": "^0.1.0" + "@google-cloud/orchestration-airflow": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", From 1332d5b091b9812019da5b249521e13cc4591b50 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 2 Oct 2021 00:54:28 +0200 Subject: [PATCH 04/48] chore(deps): update dependency sinon to v11 (#6) --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 0302755518e..bd75783e0e5 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -54,7 +54,7 @@ "mocha": "^8.4.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 0f50415901ecea2dd07b62a040d5956a3c1ed062 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 2 Oct 2021 18:07:12 +0200 Subject: [PATCH 05/48] chore(deps): update dependency mocha to v9 (#5) Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google-cloud-orchestration-airflow-service/package.json | 4 ++-- .../samples/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index bd75783e0e5..74e73bd7714 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -42,7 +42,7 @@ "google-gax": "^2.25.0" }, "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", @@ -51,7 +51,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^8.4.0", + "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^11.0.0", diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json index e2af3c263db..fc44bafd18b 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/package.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.1.0", "chai": "^4.2.0", - "mocha": "^8.0.0" + "mocha": "^9.0.0" } } From 5e8c3e8a23254e56eb4ae99e92e89491e5fc3cf2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:48:17 +0000 Subject: [PATCH 06/48] build(node): update deps used during postprocessing (#1243) (#7) --- .../protos/protos.d.ts | 3 ++- .../protos/protos.js | 7 +++++++ .../protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index bce1baa7a99..bd1c4601805 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts @@ -6542,7 +6542,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index 3da0b77bdb7..7dd44193e31 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -16060,6 +16060,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -16070,6 +16071,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -22238,6 +22240,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -22342,6 +22345,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.json b/packages/google-cloud-orchestration-airflow-service/protos/protos.json index ee126899f6e..aacddc38005 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.json +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.json @@ -1953,7 +1953,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -2596,6 +2597,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 517f5804364d045da67b1ca646a100a68391cfab Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:53:26 -0700 Subject: [PATCH 07/48] docs: fix docstring formatting (#8) Committer: @parthea PiperOrigin-RevId: 403986397 Source-Link: https://github.com/googleapis/googleapis/commit/c3d010d8a928e5550663c5ae02d2e92cfb4e2cd8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb5ac690d827f0ff7aef0cc1f775255d311f9a1a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I1YWM2OTBkODI3ZjBmZjdhZWYwY2MxZjc3NTI1NWQzMTFmOWExYSJ9 --- .../linkinator.config.json | 11 +- .../service/v1beta1/environments.proto | 1 - .../v1/environments.create_environment.js | 57 ++++++ .../v1/environments.delete_environment.js | 53 +++++ .../v1/environments.get_environment.js | 52 +++++ .../v1/environments.list_environments.js | 62 ++++++ .../v1/environments.update_environment.js | 165 ++++++++++++++++ .../v1/image_versions.list_image_versions.js | 66 +++++++ .../v1beta1/environments.check_upgrade.js | 74 +++++++ .../environments.create_environment.js | 57 ++++++ .../environments.delete_environment.js | 53 +++++ .../v1beta1/environments.get_environment.js | 52 +++++ .../v1beta1/environments.list_environments.js | 62 ++++++ .../environments.restart_web_server.js | 54 ++++++ .../environments.update_environment.js | 183 ++++++++++++++++++ .../image_versions.list_image_versions.js | 66 +++++++ .../src/v1/environments_client.ts | 6 +- .../src/v1/image_versions_client.ts | 6 +- .../src/v1beta1/environments_client.ts | 6 +- .../src/v1beta1/image_versions_client.ts | 6 +- 20 files changed, 1082 insertions(+), 10 deletions(-) create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js diff --git a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json index 0947c2e0e5b..29a223b6db6 100644 --- a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json +++ b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json @@ -1 +1,10 @@ -{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto index 76fb19ee49e..349e927b476 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -758,7 +758,6 @@ message EncryptionConfig { } // The configuration settings for Cloud Composer maintenance window. -// // The following example: // // { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js new file mode 100644 index 00000000000..e92ad59d511 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js @@ -0,0 +1,57 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1_generated_Environments_CreateEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + */ + // const parent = 'abc123' + /** + * The environment to create. + */ + // const environment = '' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function createEnvironment() { + // Construct request + const request = {}; + + // Run request + const [operation] = await serviceClient.createEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + createEnvironment(); + // [END composer_v1_generated_Environments_CreateEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js new file mode 100644 index 00000000000..9754547ac28 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1_generated_Environments_DeleteEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function deleteEnvironment() { + // Construct request + const request = {}; + + // Run request + const [operation] = await serviceClient.deleteEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + deleteEnvironment(); + // [END composer_v1_generated_Environments_DeleteEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js new file mode 100644 index 00000000000..b2260d9b8c0 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js @@ -0,0 +1,52 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1_generated_Environments_GetEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function getEnvironment() { + // Construct request + const request = {}; + + // Run request + const response = await serviceClient.getEnvironment(request); + console.log(response); + } + + getEnvironment(); + // [END composer_v1_generated_Environments_GetEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js new file mode 100644 index 00000000000..632ef6d66c2 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1_generated_Environments_ListEnvironments_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + */ + // const parent = 'abc123' + /** + * The maximum number of environments to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function listEnvironments() { + // Construct request + const request = {}; + + // Run request + const iterable = await serviceClient.listEnvironmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listEnvironments(); + // [END composer_v1_generated_Environments_ListEnvironments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js new file mode 100644 index 00000000000..e06225ccd46 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js @@ -0,0 +1,165 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1_generated_Environments_UpdateEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + /** + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + */ + // const environment = '' + /** + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * **Note:** Only the following fields can be updated: + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.databaseConfig` + * * Replace the environment's current `DatabaseConfig`. + * * `config.webServerConfig` + * * Replace the environment's current `WebServerConfig`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual environment variables. + */ + // const updateMask = '' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function updateEnvironment() { + // Construct request + const request = {}; + + // Run request + const [operation] = await serviceClient.updateEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + updateEnvironment(); + // [END composer_v1_generated_Environments_UpdateEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js new file mode 100644 index 00000000000..cac3944304a --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js @@ -0,0 +1,66 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1_generated_ImageVersions_ListImageVersions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + */ + // const parent = 'abc123' + /** + * The maximum number of image_versions to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + /** + * Whether or not image versions from old releases should be included. + */ + // const includePastReleases = true + + // Imports the Service library + const {ImageVersionsClient} = + require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new ImageVersionsClient(); + + async function listImageVersions() { + // Construct request + const request = {}; + + // Run request + const iterable = await serviceClient.listImageVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listImageVersions(); + // [END composer_v1_generated_ImageVersions_ListImageVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js new file mode 100644 index 00000000000..200d68bacf8 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js @@ -0,0 +1,74 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1beta1_generated_Environments_CheckUpgrade_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the version is a + * [semantic version](https://semver.org) or `latest`. When the patch version + * is omitted, the current Cloud Composer patch version is selected. + * When `latest` is provided instead of an explicit version number, + * the server replaces `latest` with the current Cloud Composer version + * and stores that version number in the same field. + * The portion of the image version that follows `airflow-` is an + * official Apache Airflow repository + * [release name](https://github.com/apache/incubator-airflow/releases). + * See also [Version List] + * (/composer/docs/concepts/versioning/composer-versions). + */ + // const imageVersion = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function checkUpgrade() { + // Construct request + const request = {}; + + // Run request + const [operation] = await serviceClient.checkUpgrade(request); + const [response] = await operation.promise(); + console.log(response); + } + + checkUpgrade(); + // [END composer_v1beta1_generated_Environments_CheckUpgrade_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js new file mode 100644 index 00000000000..13dab6ff723 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js @@ -0,0 +1,57 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1beta1_generated_Environments_CreateEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + */ + // const parent = 'abc123' + /** + * The environment to create. + */ + // const environment = '' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function createEnvironment() { + // Construct request + const request = {}; + + // Run request + const [operation] = await serviceClient.createEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + createEnvironment(); + // [END composer_v1beta1_generated_Environments_CreateEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js new file mode 100644 index 00000000000..88b0187133a --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1beta1_generated_Environments_DeleteEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function deleteEnvironment() { + // Construct request + const request = {}; + + // Run request + const [operation] = await serviceClient.deleteEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + deleteEnvironment(); + // [END composer_v1beta1_generated_Environments_DeleteEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js new file mode 100644 index 00000000000..3277676fe4e --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js @@ -0,0 +1,52 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1beta1_generated_Environments_GetEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function getEnvironment() { + // Construct request + const request = {}; + + // Run request + const response = await serviceClient.getEnvironment(request); + console.log(response); + } + + getEnvironment(); + // [END composer_v1beta1_generated_Environments_GetEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js new file mode 100644 index 00000000000..c7c1d97a47c --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1beta1_generated_Environments_ListEnvironments_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + */ + // const parent = 'abc123' + /** + * The maximum number of environments to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function listEnvironments() { + // Construct request + const request = {}; + + // Run request + const iterable = await serviceClient.listEnvironmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listEnvironments(); + // [END composer_v1beta1_generated_Environments_ListEnvironments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js new file mode 100644 index 00000000000..a18c5d4e12b --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1beta1_generated_Environments_RestartWebServer_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource name of the environment to restart the web server for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function restartWebServer() { + // Construct request + const request = {}; + + // Run request + const [operation] = await serviceClient.restartWebServer(request); + const [response] = await operation.promise(); + console.log(response); + } + + restartWebServer(); + // [END composer_v1beta1_generated_Environments_RestartWebServer_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js new file mode 100644 index 00000000000..0f2f66cfa7a --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js @@ -0,0 +1,183 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(updateMask) { + // [START composer_v1beta1_generated_Environments_UpdateEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + /** + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + */ + // const environment = '' + /** + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * argparse, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.argparse". The included patch + * environment would specify the scikit-learn version as follows: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and argparse will be unaffected. + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * **Note:** Only the following fields can be updated: + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. * `config.webServerNetworkAccessControl` + * * Replace the environment's current WebServerNetworkAccessControl. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual environment variables. + * * `config.softwareConfig.imageVersion` + * * Upgrade the version of the environment in-place. Refer to + * `SoftwareConfig.image_version` for information on how to format the + * new image version. Additionally, the new image version cannot effect + * a version downgrade and must match the current image version's + * Composer major version and Airflow major and minor versions. Consult + * the [Cloud Composer Version + * List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) + * for valid values. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. * `config.maintenanceWindow` + * * Maintenance window during which Cloud Composer components may be + * under maintenance. + */ + // const updateMask = '' + + // Imports the Service library + const {EnvironmentsClient} = + require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function updateEnvironment() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const [operation] = await serviceClient.updateEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + updateEnvironment(); + // [END composer_v1beta1_generated_Environments_UpdateEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js new file mode 100644 index 00000000000..9bbbcf78a2b --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js @@ -0,0 +1,66 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START composer_v1beta1_generated_ImageVersions_ListImageVersions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + */ + // const parent = 'abc123' + /** + * The maximum number of image_versions to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + /** + * Whether or not image versions from old releases should be included. + */ + // const includePastReleases = true + + // Imports the Service library + const {ImageVersionsClient} = + require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new ImageVersionsClient(); + + async function listImageVersions() { + // Construct request + const request = {}; + + // Run request + const iterable = await serviceClient.listImageVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listImageVersions(); + // [END composer_v1beta1_generated_ImageVersions_ListImageVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index c2634c244fe..95af3a10cf3 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -1151,7 +1151,8 @@ export class EnvironmentsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as gax.GaxCall, @@ -1202,7 +1203,8 @@ export class EnvironmentsClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index 4156926783f..402bacf777d 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -452,7 +452,8 @@ export class ImageVersionsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listImageVersions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listImageVersions.createStream( this.innerApiCalls.listImageVersions as gax.GaxCall, @@ -505,7 +506,8 @@ export class ImageVersionsClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listImageVersions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listImageVersions.asyncIterate( this.innerApiCalls['listImageVersions'] as GaxCall, diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index f54232ba459..9679f37ff46 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -1500,7 +1500,8 @@ export class EnvironmentsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as gax.GaxCall, @@ -1551,7 +1552,8 @@ export class EnvironmentsClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index dedf4f3f62b..8f9a2045bbf 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -452,7 +452,8 @@ export class ImageVersionsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listImageVersions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listImageVersions.createStream( this.innerApiCalls.listImageVersions as gax.GaxCall, @@ -505,7 +506,8 @@ export class ImageVersionsClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listImageVersions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listImageVersions.asyncIterate( this.innerApiCalls['listImageVersions'] as GaxCall, From 40ead85dd1bda216c9f9a70e396daa9cfb2e206b Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Tue, 26 Oct 2021 13:02:33 -0700 Subject: [PATCH 08/48] Revert "build(node): update deps used during postprocessing (#1243) (#7)" (#11) This reverts commit 23cfd196a27b6e4089969bc94006a8be41161d10. --- .../protos/protos.d.ts | 3 +-- .../protos/protos.js | 7 ------- .../protos/protos.json | 15 +-------------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index bd1c4601805..bce1baa7a99 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts @@ -6542,8 +6542,7 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 + UNORDERED_LIST = 6 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index 7dd44193e31..3da0b77bdb7 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -16060,7 +16060,6 @@ * @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); @@ -16071,7 +16070,6 @@ 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; })(); @@ -22240,7 +22238,6 @@ case 4: case 5: case 6: - case 7: break; } } @@ -22345,10 +22342,6 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.json b/packages/google-cloud-orchestration-airflow-service/protos/protos.json index aacddc38005..ee126899f6e 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.json +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.json @@ -1953,8 +1953,7 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 + "UNORDERED_LIST": 6 } }, "resourceReference": { @@ -2597,18 +2596,6 @@ ] ], "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], [ 8, 8 From c18dc3c473ef750628b386c52fa146b6e9921de1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 26 Oct 2021 13:49:12 -0700 Subject: [PATCH 09/48] docs: fix docstring formatting (#9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: fix docstring formatting Committer: @parthea PiperOrigin-RevId: 405015203 Source-Link: https://github.com/googleapis/googleapis/commit/974ad5bdfc9ba768db16b3eda2850aadd8c10a2c Source-Link: https://github.com/googleapis/googleapis-gen/commit/9cea0b99368edae46bd9cebd53fc1aca75faaead Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWNlYTBiOTkzNjhlZGFlNDZiZDljZWJkNTNmYzFhY2E3NWZhYWVhZCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../orchestration/airflow/service/v1beta1/environments.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto index 349e927b476..a96a417fc91 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -760,11 +760,13 @@ message EncryptionConfig { // The configuration settings for Cloud Composer maintenance window. // The following example: // +// ``` // { // "startTime":"2019-08-01T01:00:00Z" // "endTime":"2019-08-01T07:00:00Z" // "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" // } +// ``` // // would define a maintenance window between 01 and 07 hours UTC during // each Tuesday and Wednesday. From 6e4e6ac33707766adcf12eb606575588a241bed5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Oct 2021 22:57:18 +0200 Subject: [PATCH 10/48] chore(deps): update dependency @types/node to v16 (#10) --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 74e73bd7714..a0f5971ff83 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/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 29b9d984e829056431602035d4a1be33047eb292 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 06:32:49 -0700 Subject: [PATCH 11/48] chore: fix the wrong post processor image (#12) --- .../.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml b/packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml index a617c09aee3..2dc9abbb555 100644 --- a/packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml +++ b/packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging From 88b8a271a7f4f6b3644d2a5b660d5a3e40b2dc2f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:44:14 +0100 Subject: [PATCH 12/48] chore(deps): update dependency sinon to v12 (#13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-orchestration-airflow). --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index a0f5971ff83..b3af3ff3680 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 75cd01f7420e3146e006b7bdb02927a8cad7c702 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:50:28 +0000 Subject: [PATCH 13/48] docs(samples): add example tags to generated samples (#14) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 --- .../linkinator.config.json | 2 +- .../v1/environments.create_environment.js | 6 +- .../v1/environments.delete_environment.js | 4 +- .../v1/environments.get_environment.js | 4 +- .../v1/environments.list_environments.js | 4 +- .../v1/environments.update_environment.js | 8 +- .../v1/image_versions.list_image_versions.js | 4 +- .../v1beta1/environments.check_upgrade.js | 10 +- .../environments.create_environment.js | 6 +- .../environments.delete_environment.js | 4 +- .../v1beta1/environments.get_environment.js | 4 +- .../v1beta1/environments.list_environments.js | 4 +- .../environments.restart_web_server.js | 4 +- .../environments.update_environment.js | 12 +- .../image_versions.list_image_versions.js | 4 +- .../src/v1/environments_client.ts | 278 ++++++------ .../src/v1/image_versions_client.ts | 62 ++- .../src/v1beta1/environments_client.ts | 412 +++++++++--------- .../src/v1beta1/image_versions_client.ts | 62 ++- 19 files changed, 423 insertions(+), 471 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json +++ b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js index e92ad59d511..3ab48282295 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js @@ -27,7 +27,7 @@ function main() { /** * The environment to create. */ - // const environment = '' + // const environment = {} // Imports the Service library const {EnvironmentsClient} = @@ -36,7 +36,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function createEnvironment() { + async function callCreateEnvironment() { // Construct request const request = {}; @@ -46,7 +46,7 @@ function main() { console.log(response); } - createEnvironment(); + callCreateEnvironment(); // [END composer_v1_generated_Environments_CreateEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js index 9754547ac28..30ef43b0af5 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function deleteEnvironment() { + async function callDeleteEnvironment() { // Construct request const request = {}; @@ -42,7 +42,7 @@ function main() { console.log(response); } - deleteEnvironment(); + callDeleteEnvironment(); // [END composer_v1_generated_Environments_DeleteEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js index b2260d9b8c0..59500ab77c9 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function getEnvironment() { + async function callGetEnvironment() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - getEnvironment(); + callGetEnvironment(); // [END composer_v1_generated_Environments_GetEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js index 632ef6d66c2..044a5a371ed 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function listEnvironments() { + async function callListEnvironments() { // Construct request const request = {}; @@ -51,7 +51,7 @@ function main() { } } - listEnvironments(); + callListEnvironments(); // [END composer_v1_generated_Environments_ListEnvironments_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js index e06225ccd46..a0341b3d01e 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js @@ -28,7 +28,7 @@ function main() { * A patch environment. Fields specified by the `updateMask` will be copied * from the patch environment into the environment under update. */ - // const environment = '' + // const environment = {} /** * Required. A comma-separated list of paths, relative to `Environment`, of * fields to update. @@ -135,7 +135,7 @@ function main() { * It is an error to provide both this mask and a mask specifying one or * more individual environment variables. */ - // const updateMask = '' + // const updateMask = {} // Imports the Service library const {EnvironmentsClient} = @@ -144,7 +144,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function updateEnvironment() { + async function callUpdateEnvironment() { // Construct request const request = {}; @@ -154,7 +154,7 @@ function main() { console.log(response); } - updateEnvironment(); + callUpdateEnvironment(); // [END composer_v1_generated_Environments_UpdateEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js index cac3944304a..aeb89d63b91 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js @@ -44,7 +44,7 @@ function main() { // Instantiates a client const serviceClient = new ImageVersionsClient(); - async function listImageVersions() { + async function callListImageVersions() { // Construct request const request = {}; @@ -55,7 +55,7 @@ function main() { } } - listImageVersions(); + callListImageVersions(); // [END composer_v1_generated_ImageVersions_ListImageVersions_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js index 200d68bacf8..d196cfd09bf 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js @@ -33,15 +33,15 @@ function main() { * When used as input, the server also checks if the provided version is * supported and denies the request for an unsupported version. * The Cloud Composer portion of the version is a - * [semantic version](https://semver.org) or `latest`. When the patch version + * semantic version (https://semver.org) or `latest`. When the patch version * is omitted, the current Cloud Composer patch version is selected. * When `latest` is provided instead of an explicit version number, * the server replaces `latest` with the current Cloud Composer version * and stores that version number in the same field. * The portion of the image version that follows `airflow-` is an * official Apache Airflow repository - * [release name](https://github.com/apache/incubator-airflow/releases). - * See also [Version List] + * release name (https://github.com/apache/incubator-airflow/releases). + * See also Version List * (/composer/docs/concepts/versioning/composer-versions). */ // const imageVersion = 'abc123' @@ -53,7 +53,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function checkUpgrade() { + async function callCheckUpgrade() { // Construct request const request = {}; @@ -63,7 +63,7 @@ function main() { console.log(response); } - checkUpgrade(); + callCheckUpgrade(); // [END composer_v1beta1_generated_Environments_CheckUpgrade_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js index 13dab6ff723..ccaf548b3d5 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js @@ -27,7 +27,7 @@ function main() { /** * The environment to create. */ - // const environment = '' + // const environment = {} // Imports the Service library const {EnvironmentsClient} = @@ -36,7 +36,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function createEnvironment() { + async function callCreateEnvironment() { // Construct request const request = {}; @@ -46,7 +46,7 @@ function main() { console.log(response); } - createEnvironment(); + callCreateEnvironment(); // [END composer_v1beta1_generated_Environments_CreateEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js index 88b0187133a..0cbbec313be 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function deleteEnvironment() { + async function callDeleteEnvironment() { // Construct request const request = {}; @@ -42,7 +42,7 @@ function main() { console.log(response); } - deleteEnvironment(); + callDeleteEnvironment(); // [END composer_v1beta1_generated_Environments_DeleteEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js index 3277676fe4e..3584bb1b03f 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function getEnvironment() { + async function callGetEnvironment() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - getEnvironment(); + callGetEnvironment(); // [END composer_v1beta1_generated_Environments_GetEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js index c7c1d97a47c..82b27231316 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function listEnvironments() { + async function callListEnvironments() { // Construct request const request = {}; @@ -51,7 +51,7 @@ function main() { } } - listEnvironments(); + callListEnvironments(); // [END composer_v1beta1_generated_Environments_ListEnvironments_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js index a18c5d4e12b..201efb51ec4 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js @@ -33,7 +33,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function restartWebServer() { + async function callRestartWebServer() { // Construct request const request = {}; @@ -43,7 +43,7 @@ function main() { console.log(response); } - restartWebServer(); + callRestartWebServer(); // [END composer_v1beta1_generated_Environments_RestartWebServer_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js index 0f2f66cfa7a..24226201e33 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js @@ -28,7 +28,7 @@ function main(updateMask) { * A patch environment. Fields specified by the `updateMask` will be copied * from the patch environment into the environment under update. */ - // const environment = '' + // const environment = {} /** * Required. A comma-separated list of paths, relative to `Environment`, of * fields to update. @@ -135,8 +135,8 @@ function main(updateMask) { * new image version. Additionally, the new image version cannot effect * a version downgrade and must match the current image version's * Composer major version and Airflow major and minor versions. Consult - * the [Cloud Composer Version - * List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) + * the Cloud Composer Version + * List (https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) * for valid values. * * `config.softwareConfig.schedulerCount` * * Horizontally scale the number of schedulers in Airflow. A positive @@ -151,7 +151,7 @@ function main(updateMask) { * * Maintenance window during which Cloud Composer components may be * under maintenance. */ - // const updateMask = '' + // const updateMask = {} // Imports the Service library const {EnvironmentsClient} = @@ -160,7 +160,7 @@ function main(updateMask) { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function updateEnvironment() { + async function callUpdateEnvironment() { // Construct request const request = { updateMask, @@ -172,7 +172,7 @@ function main(updateMask) { console.log(response); } - updateEnvironment(); + callUpdateEnvironment(); // [END composer_v1beta1_generated_Environments_UpdateEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js index 9bbbcf78a2b..e89ec5a0457 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js @@ -44,7 +44,7 @@ function main() { // Instantiates a client const serviceClient = new ImageVersionsClient(); - async function listImageVersions() { + async function callListImageVersions() { // Construct request const request = {}; @@ -55,7 +55,7 @@ function main() { } } - listImageVersions(); + callListImageVersions(); // [END composer_v1beta1_generated_ImageVersions_ListImageVersions_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index 95af3a10cf3..7e6d5aa595b 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -372,6 +372,24 @@ export class EnvironmentsClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Get an existing environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. + * 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/environments.get_environment.js + * region_tag:composer_v1_generated_Environments_GetEnvironment_async + */ getEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, options?: CallOptions @@ -406,24 +424,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Get an existing environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. - * 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.getEnvironment(request); - */ getEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, optionsOrCallback?: @@ -471,6 +471,28 @@ export class EnvironmentsClient { return this.innerApiCalls.getEnvironment(request, options, callback); } + /** + * Create a new environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment + * The environment 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/v1/environments.create_environment.js + * region_tag:composer_v1_generated_Environments_CreateEnvironment_async + */ createEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, options?: CallOptions @@ -507,29 +529,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Create a new environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment - * The environment 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 - * const [operation] = await client.createEnvironment(request); - * const [response] = await operation.promise(); - */ createEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, optionsOrCallback?: @@ -587,11 +586,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/environments.create_environment.js + * region_tag:composer_v1_generated_Environments_CreateEnvironment_async */ async checkCreateEnvironmentProgress( name: string @@ -615,42 +611,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata >; } - updateEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Update an environment. * @@ -785,10 +745,45 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.updateEnvironment(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/environments.update_environment.js + * region_tag:composer_v1_generated_Environments_UpdateEnvironment_async */ + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; updateEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, optionsOrCallback?: @@ -846,11 +841,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/environments.update_environment.js + * region_tag:composer_v1_generated_Environments_UpdateEnvironment_async */ async checkUpdateEnvironmentProgress( name: string @@ -874,6 +866,26 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata >; } + /** + * Delete an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/environments.delete_environment.js + * region_tag:composer_v1_generated_Environments_DeleteEnvironment_async + */ deleteEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, options?: CallOptions @@ -910,27 +922,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Delete an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteEnvironment(request); - * const [response] = await operation.promise(); - */ deleteEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, optionsOrCallback?: @@ -988,11 +979,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/environments.delete_environment.js + * region_tag:composer_v1_generated_Environments_DeleteEnvironment_async */ async checkDeleteEnvironmentProgress( name: string @@ -1016,6 +1004,31 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata >; } + /** + * List environments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. + * 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 `listEnvironmentsAsync()` + * 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. + */ listEnvironments( request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, options?: CallOptions @@ -1047,31 +1060,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.IEnvironment > ): void; - /** - * List environments. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. - * 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 `listEnvironmentsAsync()` - * 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. - */ listEnvironments( request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, optionsOrCallback?: @@ -1184,11 +1172,8 @@ export class EnvironmentsClient { * 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.listEnvironmentsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/environments.list_environments.js + * region_tag:composer_v1_generated_Environments_ListEnvironments_async */ listEnvironmentsAsync( request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, @@ -1202,7 +1187,6 @@ export class EnvironmentsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index 402bacf777d..bcaad4c2314 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -313,6 +313,33 @@ export class ImageVersionsClient { // -- Service calls -- // ------------------- + /** + * List ImageVersions for provided location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1.ImageVersion}. + * 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 `listImageVersionsAsync()` + * 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. + */ listImageVersions( request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, options?: CallOptions @@ -344,33 +371,6 @@ export class ImageVersionsClient { protos.google.cloud.orchestration.airflow.service.v1.IImageVersion > ): void; - /** - * List ImageVersions for provided location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1.ImageVersion}. - * 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 `listImageVersionsAsync()` - * 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. - */ listImageVersions( request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, optionsOrCallback?: @@ -487,11 +487,8 @@ export class ImageVersionsClient { * 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.listImageVersionsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/image_versions.list_image_versions.js + * region_tag:composer_v1_generated_ImageVersions_ListImageVersions_async */ listImageVersionsAsync( request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, @@ -505,7 +502,6 @@ export class ImageVersionsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listImageVersions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index 9679f37ff46..d26ee127bb4 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -396,6 +396,24 @@ export class EnvironmentsClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Get an existing environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. + * 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/environments.get_environment.js + * region_tag:composer_v1beta1_generated_Environments_GetEnvironment_async + */ getEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, options?: CallOptions @@ -430,24 +448,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Get an existing environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. - * 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.getEnvironment(request); - */ getEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, optionsOrCallback?: @@ -495,6 +495,28 @@ export class EnvironmentsClient { return this.innerApiCalls.getEnvironment(request, options, callback); } + /** + * Create a new environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment + * The environment 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/v1beta1/environments.create_environment.js + * region_tag:composer_v1beta1_generated_Environments_CreateEnvironment_async + */ createEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, options?: CallOptions @@ -531,29 +553,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Create a new environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment - * The environment 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 - * const [operation] = await client.createEnvironment(request); - * const [response] = await operation.promise(); - */ createEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, optionsOrCallback?: @@ -611,11 +610,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.create_environment.js + * region_tag:composer_v1beta1_generated_Environments_CreateEnvironment_async */ async checkCreateEnvironmentProgress( name: string @@ -639,42 +635,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } - updateEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Update an environment. * @@ -825,10 +785,45 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.updateEnvironment(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1beta1/environments.update_environment.js + * region_tag:composer_v1beta1_generated_Environments_UpdateEnvironment_async */ + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; updateEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, optionsOrCallback?: @@ -886,11 +881,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.update_environment.js + * region_tag:composer_v1beta1_generated_Environments_UpdateEnvironment_async */ async checkUpdateEnvironmentProgress( name: string @@ -914,6 +906,26 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } + /** + * Delete an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/v1beta1/environments.delete_environment.js + * region_tag:composer_v1beta1_generated_Environments_DeleteEnvironment_async + */ deleteEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, options?: CallOptions @@ -950,27 +962,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Delete an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteEnvironment(request); - * const [response] = await operation.promise(); - */ deleteEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, optionsOrCallback?: @@ -1028,11 +1019,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.delete_environment.js + * region_tag:composer_v1beta1_generated_Environments_DeleteEnvironment_async */ async checkDeleteEnvironmentProgress( name: string @@ -1056,6 +1044,27 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } + /** + * Restart Airflow web server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to restart the web server for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/v1beta1/environments.restart_web_server.js + * region_tag:composer_v1beta1_generated_Environments_RestartWebServer_async + */ restartWebServer( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, options?: CallOptions @@ -1092,28 +1101,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Restart Airflow web server. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to restart the web server for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.restartWebServer(request); - * const [response] = await operation.promise(); - */ restartWebServer( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, optionsOrCallback?: @@ -1171,11 +1158,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkRestartWebServerProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.restart_web_server.js + * region_tag:composer_v1beta1_generated_Environments_RestartWebServer_async */ async checkRestartWebServerProgress( name: string @@ -1199,42 +1183,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } - checkUpgrade( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - checkUpgrade( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - checkUpgrade( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Check if an upgrade operation on the environment will succeed. * @@ -1276,10 +1224,45 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.checkUpgrade(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1beta1/environments.check_upgrade.js + * region_tag:composer_v1beta1_generated_Environments_CheckUpgrade_async */ + checkUpgrade( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; checkUpgrade( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, optionsOrCallback?: @@ -1337,11 +1320,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCheckUpgradeProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.check_upgrade.js + * region_tag:composer_v1beta1_generated_Environments_CheckUpgrade_async */ async checkCheckUpgradeProgress( name: string @@ -1365,6 +1345,31 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } + /** + * List environments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. + * 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 `listEnvironmentsAsync()` + * 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. + */ listEnvironments( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, options?: CallOptions @@ -1396,31 +1401,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment > ): void; - /** - * List environments. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. - * 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 `listEnvironmentsAsync()` - * 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. - */ listEnvironments( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, optionsOrCallback?: @@ -1533,11 +1513,8 @@ export class EnvironmentsClient { * 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.listEnvironmentsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/environments.list_environments.js + * region_tag:composer_v1beta1_generated_Environments_ListEnvironments_async */ listEnvironmentsAsync( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, @@ -1551,7 +1528,6 @@ export class EnvironmentsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index 8f9a2045bbf..5184fedbcbd 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -313,6 +313,33 @@ export class ImageVersionsClient { // -- Service calls -- // ------------------- + /** + * List ImageVersions for provided location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion}. + * 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 `listImageVersionsAsync()` + * 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. + */ listImageVersions( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, options?: CallOptions @@ -344,33 +371,6 @@ export class ImageVersionsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion > ): void; - /** - * List ImageVersions for provided location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion}. - * 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 `listImageVersionsAsync()` - * 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. - */ listImageVersions( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, optionsOrCallback?: @@ -487,11 +487,8 @@ export class ImageVersionsClient { * 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.listImageVersionsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/image_versions.list_image_versions.js + * region_tag:composer_v1beta1_generated_ImageVersions_ListImageVersions_async */ listImageVersionsAsync( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, @@ -505,7 +502,6 @@ export class ImageVersionsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listImageVersions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); From 4c54065405d97a8d70dc90c184479a846be9f682 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:18:13 +0000 Subject: [PATCH 14/48] build: add generated samples to .eslintignore (#15) --- .../.eslintignore | 1 + .../protos/protos.d.ts | 3 ++- .../protos/protos.js | 7 +++++++ .../protos/protos.json | 15 ++++++++++++++- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/.eslintignore b/packages/google-cloud-orchestration-airflow-service/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-orchestration-airflow-service/.eslintignore +++ b/packages/google-cloud-orchestration-airflow-service/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index bce1baa7a99..bd1c4601805 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts @@ -6542,7 +6542,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index 3da0b77bdb7..7dd44193e31 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -16060,6 +16060,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -16070,6 +16071,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -22238,6 +22240,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -22342,6 +22345,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.json b/packages/google-cloud-orchestration-airflow-service/protos/protos.json index ee126899f6e..aacddc38005 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.json +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.json @@ -1953,7 +1953,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -2596,6 +2597,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 4fcd399ed328065f41a5b8cf63aa87e9692dbbe9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 21:38:22 +0000 Subject: [PATCH 15/48] docs(node): support "stable"/"preview" release level (#1312) (#18) --- packages/google-cloud-orchestration-airflow-service/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-orchestration-airflow-service/README.md b/packages/google-cloud-orchestration-airflow-service/README.md index 23354031079..031644e431d 100644 --- a/packages/google-cloud-orchestration-airflow-service/README.md +++ b/packages/google-cloud-orchestration-airflow-service/README.md @@ -132,6 +132,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From e218aac9ec4f7e46d88ec30a8895d36f7bdb2524 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 22:42:26 +0000 Subject: [PATCH 16/48] docs(badges): tweak badge to use new preview/stable language (#1314) (#19) --- packages/google-cloud-orchestration-airflow-service/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/README.md b/packages/google-cloud-orchestration-airflow-service/README.md index 031644e431d..e32a3d560a6 100644 --- a/packages/google-cloud-orchestration-airflow-service/README.md +++ b/packages/google-cloud-orchestration-airflow-service/README.md @@ -6,7 +6,6 @@ [![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/orchestration-airflow.svg)](https://www.npmjs.org/package/@google-cloud/orchestration-airflow) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-orchestration-airflow/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-orchestration-airflow) From 86ad2268b19406d0890eb382bd3e9ca7ae84111a Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 19:02:20 -0500 Subject: [PATCH 17/48] chore: add api_shortname and library_type to repo metadata (#17) Update .repo-metadata.json as required by go/library-data-integrity --- .../.repo-metadata.json | 6 ++++-- .../google-cloud-orchestration-airflow-service/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json b/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json index 20cb891ff55..729887de0a6 100644 --- a/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json +++ b/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json @@ -6,10 +6,12 @@ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/orchestration-airflow/latest", "api_id": "composer.googleapis.com", "distribution_name": "@google-cloud/orchestration-airflow", - "release_level": "ga", + "release_level": "stable", "default_version": "v1", "language": "nodejs", "repo": "googleapis/nodejs-orchestration-airflow", "requires_billing": true, - "issue_tracker": "https://issuetracker.google.com/issues/new?component=460446" + "issue_tracker": "https://issuetracker.google.com/issues/new?component=460446", + "api_shortname": "composer", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-orchestration-airflow-service/README.md b/packages/google-cloud-orchestration-airflow-service/README.md index e32a3d560a6..9e95d5765a9 100644 --- a/packages/google-cloud-orchestration-airflow-service/README.md +++ b/packages/google-cloud-orchestration-airflow-service/README.md @@ -4,7 +4,7 @@ # [Cloud Composer: Node.js Client](https://github.com/googleapis/nodejs-orchestration-airflow) -[![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) +[![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/orchestration-airflow.svg)](https://www.npmjs.org/package/@google-cloud/orchestration-airflow) @@ -121,10 +121,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -132,7 +132,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 890c7b7a9e57c550878857d3b41cc629fe04271a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:18:44 +0000 Subject: [PATCH 18/48] test(nodejs): remove 15 add 16 (#1322) (#21) --- .../protos/protos.d.ts | 2 +- .../google-cloud-orchestration-airflow-service/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index bd1c4601805..d3c75a61ca6 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index 7dd44193e31..958ee917ec7 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From bfac7cfb8a03b0b2f6b35e588f3e417ce138e1c9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 16:30:41 +0000 Subject: [PATCH 19/48] chore: update v2.12.0 gapic-generator-typescript (#25) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- .../.jsdoc.js | 4 ++-- .../linkinator.config.json | 10 ++++++++-- .../generated/v1/environments.create_environment.js | 7 ++++--- .../generated/v1/environments.delete_environment.js | 7 ++++--- .../generated/v1/environments.get_environment.js | 7 ++++--- .../generated/v1/environments.list_environments.js | 9 +++++---- .../generated/v1/environments.update_environment.js | 7 ++++--- .../generated/v1/image_versions.list_image_versions.js | 9 +++++---- .../generated/v1beta1/environments.check_upgrade.js | 9 +++++---- .../v1beta1/environments.create_environment.js | 7 ++++--- .../v1beta1/environments.delete_environment.js | 7 ++++--- .../generated/v1beta1/environments.get_environment.js | 7 ++++--- .../v1beta1/environments.list_environments.js | 9 +++++---- .../v1beta1/environments.restart_web_server.js | 7 ++++--- .../v1beta1/environments.update_environment.js | 4 ++-- .../v1beta1/image_versions.list_image_versions.js | 9 +++++---- .../src/v1/environments_client.ts | 2 +- .../src/v1/image_versions_client.ts | 2 +- .../src/v1/index.ts | 2 +- .../src/v1beta1/environments_client.ts | 2 +- .../src/v1beta1/image_versions_client.ts | 2 +- .../src/v1beta1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic_environments_v1.ts | 2 +- .../test/gapic_environments_v1beta1.ts | 2 +- .../test/gapic_image_versions_v1.ts | 2 +- .../test/gapic_image_versions_v1beta1.ts | 2 +- 29 files changed, 82 insertions(+), 63 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/.jsdoc.js b/packages/google-cloud-orchestration-airflow-service/.jsdoc.js index 96271aa8ffa..4eacd7d3697 100644 --- a/packages/google-cloud-orchestration-airflow-service/.jsdoc.js +++ b/packages/google-cloud-orchestration-airflow-service/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/orchestration-airflow', diff --git a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json +++ b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js index 3ab48282295..d17e910b878 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -30,15 +31,15 @@ function main() { // const environment = {} // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callCreateEnvironment() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await serviceClient.createEnvironment(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js index 30ef43b0af5..c72b3f523f0 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -26,15 +27,15 @@ function main() { // const name = 'abc123' // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callDeleteEnvironment() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await serviceClient.deleteEnvironment(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js index 59500ab77c9..55404d8c815 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -26,15 +27,15 @@ function main() { // const name = 'abc123' // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callGetEnvironment() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await serviceClient.getEnvironment(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js index 044a5a371ed..4e6335e60fd 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,20 +35,20 @@ function main() { // const pageToken = 'abc123' // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callListEnvironments() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await serviceClient.listEnvironmentsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js index a0341b3d01e..1853b527e05 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -138,15 +139,15 @@ function main() { // const updateMask = {} // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callUpdateEnvironment() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await serviceClient.updateEnvironment(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js index aeb89d63b91..cd589ed6098 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -38,20 +39,20 @@ function main() { // const includePastReleases = true // Imports the Service library - const {ImageVersionsClient} = - require('@google-cloud/orchestration-airflow').v1; + const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow').v1; // Instantiates a client const serviceClient = new ImageVersionsClient(); async function callListImageVersions() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await serviceClient.listImageVersionsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js index d196cfd09bf..42e1552b7bc 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -41,21 +42,21 @@ function main() { * The portion of the image version that follows `airflow-` is an * official Apache Airflow repository * release name (https://github.com/apache/incubator-airflow/releases). - * See also Version List + * See also Version List * (/composer/docs/concepts/versioning/composer-versions). */ // const imageVersion = 'abc123' // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1beta1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callCheckUpgrade() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await serviceClient.checkUpgrade(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js index ccaf548b3d5..7c021eb2358 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -30,15 +31,15 @@ function main() { // const environment = {} // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1beta1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callCreateEnvironment() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await serviceClient.createEnvironment(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js index 0cbbec313be..cd608961617 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -26,15 +27,15 @@ function main() { // const name = 'abc123' // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1beta1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callDeleteEnvironment() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await serviceClient.deleteEnvironment(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js index 3584bb1b03f..6fe17ae3f01 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -26,15 +27,15 @@ function main() { // const name = 'abc123' // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1beta1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callGetEnvironment() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await serviceClient.getEnvironment(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js index 82b27231316..5290fcd328a 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,20 +35,20 @@ function main() { // const pageToken = 'abc123' // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1beta1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callListEnvironments() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await serviceClient.listEnvironmentsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js index 201efb51ec4..cb4198cc1c2 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -27,15 +28,15 @@ function main() { // const name = 'abc123' // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1beta1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; // Instantiates a client const serviceClient = new EnvironmentsClient(); async function callRestartWebServer() { // Construct request - const request = {}; + const request = { + }; // Run request const [operation] = await serviceClient.restartWebServer(request); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js index 24226201e33..5d1aa25a209 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(updateMask) { @@ -154,8 +155,7 @@ function main(updateMask) { // const updateMask = {} // Imports the Service library - const {EnvironmentsClient} = - require('@google-cloud/orchestration-airflow').v1beta1; + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; // Instantiates a client const serviceClient = new EnvironmentsClient(); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js index e89ec5a0457..d437a55eeb5 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -38,20 +39,20 @@ function main() { // const includePastReleases = true // Imports the Service library - const {ImageVersionsClient} = - require('@google-cloud/orchestration-airflow').v1beta1; + const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow').v1beta1; // Instantiates a client const serviceClient = new ImageVersionsClient(); async function callListImageVersions() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await serviceClient.listImageVersionsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index 7e6d5aa595b..07b6a4cfdf2 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index bcaad4c2314..b8ad1e8fb62 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/index.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/index.ts index 1baa9f1bea8..9a109a1d699 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/index.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index d26ee127bb4..bd64ca2b2cc 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index 5184fedbcbd..cf407d4facd 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/index.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/index.ts index 1baa9f1bea8..9a109a1d699 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/index.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.js b/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.js index b616227b1a8..d424877d268 100644 --- a/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.ts index 23470a37274..7f8e319974a 100644 --- a/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-orchestration-airflow-service/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/system-test/install.ts b/packages/google-cloud-orchestration-airflow-service/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-orchestration-airflow-service/system-test/install.ts +++ b/packages/google-cloud-orchestration-airflow-service/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts index a59109ddac3..1a3ab84ece6 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts index 749942b39fb..6c641a8f974 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts index 597e9c345bc..2f7c255bcec 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts index a0863eb29f0..12afbbec684 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 0ad47c0dd538fd07045f9e45ba5754a4c77072a5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Feb 2022 16:58:56 +0100 Subject: [PATCH 20/48] chore(deps): update dependency sinon to v13 (#27) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`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.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-orchestration-airflow). --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index b3af3ff3680..1232b065851 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From dfc77d37888d42cc50b8cb5ba49ab4c733869e12 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:08:27 +0000 Subject: [PATCH 21/48] docs(nodejs): version support policy edits (#1346) (#29) --- .../README.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/README.md b/packages/google-cloud-orchestration-airflow-service/README.md index 9e95d5765a9..2ddf237857b 100644 --- a/packages/google-cloud-orchestration-airflow-service/README.md +++ b/packages/google-cloud-orchestration-airflow-service/README.md @@ -100,21 +100,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/orchestration-airflow@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From e2bb192c0594d3517226786dbc20c45f65030774 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:08:59 +0000 Subject: [PATCH 22/48] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#30) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../v1/environments.create_environment.js | 9 +- .../v1/environments.delete_environment.js | 9 +- .../v1/environments.get_environment.js | 9 +- .../v1/environments.list_environments.js | 9 +- .../v1/environments.update_environment.js | 9 +- .../v1/image_versions.list_image_versions.js | 9 +- ...loud.orchestration.airflow.service.v1.json | 287 ++++++++++++++ .../v1beta1/environments.check_upgrade.js | 9 +- .../environments.create_environment.js | 9 +- .../environments.delete_environment.js | 9 +- .../v1beta1/environments.get_environment.js | 9 +- .../v1beta1/environments.list_environments.js | 9 +- .../environments.restart_web_server.js | 9 +- .../environments.update_environment.js | 9 +- .../image_versions.list_image_versions.js | 9 +- ...orchestration.airflow.service.v1beta1.json | 371 ++++++++++++++++++ .../src/v1/environments_client.ts | 5 +- .../src/v1/image_versions_client.ts | 5 +- .../src/v1beta1/environments_client.ts | 5 +- .../src/v1beta1/image_versions_client.ts | 5 +- .../test/gapic_environments_v1.ts | 35 +- .../test/gapic_environments_v1beta1.ts | 35 +- .../test/gapic_image_versions_v1.ts | 19 +- .../test/gapic_image_versions_v1beta1.ts | 19 +- 24 files changed, 864 insertions(+), 48 deletions(-) create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json create mode 100644 packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js index d17e910b878..32b86a82643 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js index c72b3f523f0..10a3315e766 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js index 55404d8c815..910fafc8db1 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js index 4e6335e60fd..7bd6c6d1a21 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js index 1853b527e05..073745153ec 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js index cd589ed6098..8d7bb957f4f 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json new file mode 100644 index 00000000000..d5d5d789c9e --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -0,0 +1,287 @@ +{ + "clientLibrary": { + "name": "nodejs-service", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.orchestration.airflow.service.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "composer_v1_generated_Environments_CreateEnvironment_async", + "title": "Environments createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create a new environment.", + "canonical": true, + "file": "environments.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1.Environment" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_GetEnvironment_async", + "title": "Environments getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get an existing environment.", + "canonical": true, + "file": "environments.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.Environment", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_ListEnvironments_async", + "title": "Environments listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " List environments.", + "canonical": true, + "file": "environments.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_UpdateEnvironment_async", + "title": "Environments updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update an environment.", + "canonical": true, + "file": "environments.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 163, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1.Environment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_DeleteEnvironment_async", + "title": "Environments deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete an environment.", + "canonical": true, + "file": "environments.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_ImageVersions_ListImageVersions_async", + "title": "Environments listImageVersions Sample", + "origin": "API_DEFINITION", + "description": " List ImageVersions for provided location.", + "canonical": true, + "file": "image_versions.list_image_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "include_past_releases", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse", + "client": { + "shortName": "ImageVersionsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersionsClient" + }, + "method": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", + "service": { + "shortName": "ImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions" + } + } + } + } + ] +} diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js index 42e1552b7bc..a3e8726127a 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js index 7c021eb2358..f06ea9a0708 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js index cd608961617..47130b7bacd 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js index 6fe17ae3f01..282f8ac30d6 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js index 5290fcd328a..7f956d6dfe0 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js index cb4198cc1c2..db0b88f24d6 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js index 5d1aa25a209..615556a434f 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js index d437a55eeb5..f6364d9d5dc 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json new file mode 100644 index 00000000000..37de73e21a1 --- /dev/null +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -0,0 +1,371 @@ +{ + "clientLibrary": { + "name": "nodejs-service", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.orchestration.airflow.service.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "composer_v1beta1_generated_Environments_CreateEnvironment_async", + "title": "Environments createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create a new environment.", + "canonical": true, + "file": "environments.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_GetEnvironment_async", + "title": "Environments getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get an existing environment.", + "canonical": true, + "file": "environments.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.Environment", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_ListEnvironments_async", + "title": "Environments listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " List environments.", + "canonical": true, + "file": "environments.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_UpdateEnvironment_async", + "title": "Environments updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update an environment.", + "canonical": true, + "file": "environments.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 180, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_DeleteEnvironment_async", + "title": "Environments deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete an environment.", + "canonical": true, + "file": "environments.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_RestartWebServer_async", + "title": "Environments restartWebServer Sample", + "origin": "API_DEFINITION", + "description": " Restart Airflow web server.", + "canonical": true, + "file": "environments.restart_web_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestartWebServer", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "RestartWebServer", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_CheckUpgrade_async", + "title": "Environments checkUpgrade Sample", + "origin": "API_DEFINITION", + "description": " Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.", + "canonical": true, + "file": "environments.check_upgrade.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckUpgrade", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "image_version", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "CheckUpgrade", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_ImageVersions_ListImageVersions_async", + "title": "Environments listImageVersions Sample", + "origin": "API_DEFINITION", + "description": " List ImageVersions for provided location.", + "canonical": true, + "file": "image_versions.list_image_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "include_past_releases", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse", + "client": { + "shortName": "ImageVersionsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient" + }, + "method": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", + "service": { + "shortName": "ImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions" + } + } + } + } + ] +} diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index 07b6a4cfdf2..1f05b033749 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -1259,9 +1259,8 @@ export class EnvironmentsClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.environmentsStub!.then(stub => { + if (this.environmentsStub && !this._terminated) { + return this.environmentsStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index b8ad1e8fb62..eba22408f70 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -574,9 +574,8 @@ export class ImageVersionsClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.imageVersionsStub!.then(stub => { + if (this.imageVersionsStub && !this._terminated) { + return this.imageVersionsStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index bd64ca2b2cc..d7442d1dc5f 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -1600,9 +1600,8 @@ export class EnvironmentsClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.environmentsStub!.then(stub => { + if (this.environmentsStub && !this._terminated) { + return this.environmentsStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index cf407d4facd..ecbc6e3c58e 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -574,9 +574,8 @@ export class ImageVersionsClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.imageVersionsStub!.then(stub => { + if (this.imageVersionsStub && !this._terminated) { + return this.imageVersionsStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts index 1a3ab84ece6..ea3554ebe8e 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts @@ -183,12 +183,27 @@ describe('v1.EnvironmentsClient', () => { assert(client.environmentsStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new environmentsModule.v1.EnvironmentsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.environmentsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -334,6 +349,22 @@ describe('v1.EnvironmentsClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getEnvironment with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEnvironment(request), expectedError); + }); }); describe('createEnvironment', () => { diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts index 6c641a8f974..be63b3709b5 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts @@ -185,12 +185,27 @@ describe('v1beta1.EnvironmentsClient', () => { assert(client.environmentsStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new environmentsModule.v1beta1.EnvironmentsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.environmentsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -336,6 +351,22 @@ describe('v1beta1.EnvironmentsClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getEnvironment with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEnvironment(request), expectedError); + }); }); describe('createEnvironment', () => { diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts index 2f7c255bcec..c31fcf74c08 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts @@ -151,12 +151,27 @@ describe('v1.ImageVersionsClient', () => { assert(client.imageVersionsStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new imageversionsModule.v1.ImageVersionsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.imageVersionsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts index 12afbbec684..a6f4473cfd0 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts @@ -153,12 +153,27 @@ describe('v1beta1.ImageVersionsClient', () => { assert(client.imageVersionsStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new imageversionsModule.v1beta1.ImageVersionsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.imageVersionsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { From f1a1f99b6bef87d91bc1e25ac93d550228e06563 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:30:35 +0000 Subject: [PATCH 23/48] chore: update v2.14.2 gapic-generator-typescript (#34) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- .../test/gapic_environments_v1.ts | 1 - .../test/gapic_environments_v1beta1.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts index ea3554ebe8e..958c016a6eb 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts @@ -360,7 +360,6 @@ describe('v1.EnvironmentsClient', () => { new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getEnvironment(request), expectedError); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts index be63b3709b5..ecbc8f87765 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts @@ -362,7 +362,6 @@ describe('v1beta1.EnvironmentsClient', () => { new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getEnvironment(request), expectedError); From 487f7a9caeb25f1c6d276c8db226d22d170444c2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 02:34:12 +0000 Subject: [PATCH 24/48] build(node): update client library version in samples metadata (#1356) (#41) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 --- ...loud.orchestration.airflow.service.v1.json | 548 +++++++------- ...orchestration.airflow.service.v1beta1.json | 708 +++++++++--------- 2 files changed, 628 insertions(+), 628 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json index d5d5d789c9e..50ac9d11134 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -1,287 +1,287 @@ { - "clientLibrary": { - "name": "nodejs-service", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.orchestration.airflow.service.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "composer_v1_generated_Environments_CreateEnvironment_async", - "title": "Environments createEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Create a new environment.", - "canonical": true, - "file": "environments.create_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.orchestration.airflow.service.v1.Environment" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } + "clientLibrary": { + "name": "nodejs-service", + "version": "1.0.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.orchestration.airflow.service.v1", + "version": "v1" + } + ] }, - { - "regionTag": "composer_v1_generated_Environments_GetEnvironment_async", - "title": "Environments getEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Get an existing environment.", - "canonical": true, - "file": "environments.get_environment.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.Environment", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + "regionTag": "composer_v1_generated_Environments_CreateEnvironment_async", + "title": "Environments createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create a new environment.", + "canonical": true, + "file": "environments.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1.Environment" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } }, - "method": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_ListEnvironments_async", - "title": "Environments listEnvironments Sample", - "origin": "API_DEFINITION", - "description": " List environments.", - "canonical": true, - "file": "environments.list_environments.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + "regionTag": "composer_v1_generated_Environments_GetEnvironment_async", + "title": "Environments getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get an existing environment.", + "canonical": true, + "file": "environments.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.Environment", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } }, - "method": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_UpdateEnvironment_async", - "title": "Environments updateEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Update an environment.", - "canonical": true, - "file": "environments.update_environment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 163, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.orchestration.airflow.service.v1.Environment" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + "regionTag": "composer_v1_generated_Environments_ListEnvironments_async", + "title": "Environments listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " List environments.", + "canonical": true, + "file": "environments.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } }, - "method": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_DeleteEnvironment_async", - "title": "Environments deleteEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Delete an environment.", - "canonical": true, - "file": "environments.delete_environment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + "regionTag": "composer_v1_generated_Environments_UpdateEnvironment_async", + "title": "Environments updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update an environment.", + "canonical": true, + "file": "environments.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 163, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1.Environment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } }, - "method": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_ImageVersions_ListImageVersions_async", - "title": "Environments listImageVersions Sample", - "origin": "API_DEFINITION", - "description": " List ImageVersions for provided location.", - "canonical": true, - "file": "image_versions.list_image_versions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "include_past_releases", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse", - "client": { - "shortName": "ImageVersionsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersionsClient" + "regionTag": "composer_v1_generated_Environments_DeleteEnvironment_async", + "title": "Environments deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete an environment.", + "canonical": true, + "file": "environments.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } }, - "method": { - "shortName": "ListImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", - "service": { - "shortName": "ImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions" - } + { + "regionTag": "composer_v1_generated_ImageVersions_ListImageVersions_async", + "title": "Environments listImageVersions Sample", + "origin": "API_DEFINITION", + "description": " List ImageVersions for provided location.", + "canonical": true, + "file": "image_versions.list_image_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "include_past_releases", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse", + "client": { + "shortName": "ImageVersionsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersionsClient" + }, + "method": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", + "service": { + "shortName": "ImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json index 37de73e21a1..0da30cc0c36 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -1,371 +1,371 @@ { - "clientLibrary": { - "name": "nodejs-service", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.orchestration.airflow.service.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "composer_v1beta1_generated_Environments_CreateEnvironment_async", - "title": "Environments createEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Create a new environment.", - "canonical": true, - "file": "environments.create_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } + "clientLibrary": { + "name": "nodejs-service", + "version": "1.0.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.orchestration.airflow.service.v1beta1", + "version": "v1beta1" + } + ] }, - { - "regionTag": "composer_v1beta1_generated_Environments_GetEnvironment_async", - "title": "Environments getEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Get an existing environment.", - "canonical": true, - "file": "environments.get_environment.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.Environment", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + "regionTag": "composer_v1beta1_generated_Environments_CreateEnvironment_async", + "title": "Environments createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create a new environment.", + "canonical": true, + "file": "environments.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } }, - "method": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_ListEnvironments_async", - "title": "Environments listEnvironments Sample", - "origin": "API_DEFINITION", - "description": " List environments.", - "canonical": true, - "file": "environments.list_environments.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + "regionTag": "composer_v1beta1_generated_Environments_GetEnvironment_async", + "title": "Environments getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get an existing environment.", + "canonical": true, + "file": "environments.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.Environment", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } }, - "method": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_UpdateEnvironment_async", - "title": "Environments updateEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Update an environment.", - "canonical": true, - "file": "environments.update_environment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 180, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + "regionTag": "composer_v1beta1_generated_Environments_ListEnvironments_async", + "title": "Environments listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " List environments.", + "canonical": true, + "file": "environments.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } }, - "method": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_DeleteEnvironment_async", - "title": "Environments deleteEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Delete an environment.", - "canonical": true, - "file": "environments.delete_environment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + "regionTag": "composer_v1beta1_generated_Environments_UpdateEnvironment_async", + "title": "Environments updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update an environment.", + "canonical": true, + "file": "environments.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 180, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } }, - "method": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_RestartWebServer_async", - "title": "Environments restartWebServer Sample", - "origin": "API_DEFINITION", - "description": " Restart Airflow web server.", - "canonical": true, - "file": "environments.restart_web_server.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestartWebServer", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + "regionTag": "composer_v1beta1_generated_Environments_DeleteEnvironment_async", + "title": "Environments deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete an environment.", + "canonical": true, + "file": "environments.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } }, - "method": { - "shortName": "RestartWebServer", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_CheckUpgrade_async", - "title": "Environments checkUpgrade Sample", - "origin": "API_DEFINITION", - "description": " Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.", - "canonical": true, - "file": "environments.check_upgrade.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckUpgrade", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "image_version", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + "regionTag": "composer_v1beta1_generated_Environments_RestartWebServer_async", + "title": "Environments restartWebServer Sample", + "origin": "API_DEFINITION", + "description": " Restart Airflow web server.", + "canonical": true, + "file": "environments.restart_web_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestartWebServer", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "RestartWebServer", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } }, - "method": { - "shortName": "CheckUpgrade", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_ImageVersions_ListImageVersions_async", - "title": "Environments listImageVersions Sample", - "origin": "API_DEFINITION", - "description": " List ImageVersions for provided location.", - "canonical": true, - "file": "image_versions.list_image_versions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "include_past_releases", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse", - "client": { - "shortName": "ImageVersionsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient" + "regionTag": "composer_v1beta1_generated_Environments_CheckUpgrade_async", + "title": "Environments checkUpgrade Sample", + "origin": "API_DEFINITION", + "description": " Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.", + "canonical": true, + "file": "environments.check_upgrade.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckUpgrade", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "image_version", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "CheckUpgrade", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } }, - "method": { - "shortName": "ListImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", - "service": { - "shortName": "ImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions" - } + { + "regionTag": "composer_v1beta1_generated_ImageVersions_ListImageVersions_async", + "title": "Environments listImageVersions Sample", + "origin": "API_DEFINITION", + "description": " List ImageVersions for provided location.", + "canonical": true, + "file": "image_versions.list_image_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "include_past_releases", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse", + "client": { + "shortName": "ImageVersionsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient" + }, + "method": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", + "service": { + "shortName": "ImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From e210fa208416dbd39079ba5605c82e7c2ec30d3d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:40:10 +0200 Subject: [PATCH 25/48] chore(deps): update dependency sinon to v14 (#44) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-orchestration-airflow). --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 1232b065851..c0c4508902c 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From c7e0615d6376709c1de0706424eda84b886f01bd Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 18 May 2022 18:49:35 -0700 Subject: [PATCH 26/48] build!: update library to use Node 12 (#46) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- .../package.json | 8 ++++---- .../samples/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index c0c4508902c..4b85a7b164d 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.25.0" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", @@ -51,16 +51,16 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^9.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.1.2", - "typescript": "^4.2.4", + "typescript": "^4.6.4", "webpack": "^5.36.2", "webpack-cli": "^4.7.0" }, "engines": { - "node": ">=v10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json index fc44bafd18b..c55f7636102 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/package.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" From 62ee4467e6ba32910f1df77cf670f39d0c6114aa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 16:58:28 +0200 Subject: [PATCH 27/48] chore(deps): update dependency jsdoc-region-tag to v2 (#50) 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-orchestration-airflow). --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 4b85a7b164d..2d4950f929f 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -49,7 +49,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^1.0.2", - "jsdoc-region-tag": "^1.0.6", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.13.6", "mocha": "^9.2.2", "null-loader": "^4.0.1", From 854ac120eb9eb7df8961a5d01ad80cadcf4f541d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 17:32:36 +0200 Subject: [PATCH 28/48] chore(deps): update dependency jsdoc-fresh to v2 (#49) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-orchestration-airflow). --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 2d4950f929f..f221fe3108a 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/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": "^2.0.0", "linkinator": "^2.13.6", "mocha": "^9.2.2", From c64ff128e0cc735e1090429d2482f454e618b5d3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:28:08 -0400 Subject: [PATCH 29/48] chore(main): release 2.0.0 (#47) 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: Benjamin E. Coe --- .../CHANGELOG.md | 11 +++++++++++ .../package.json | 2 +- ...google.cloud.orchestration.airflow.service.v1.json | 2 +- ...e.cloud.orchestration.airflow.service.v1beta1.json | 2 +- .../samples/package.json | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md index f3d700427b8..d0c30b727b8 100644 --- a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md +++ b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.0.0](https://github.com/googleapis/nodejs-orchestration-airflow/compare/v1.0.0...v2.0.0) (2022-06-10) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#46) + +### Build System + +* update library to use Node 12 ([#46](https://github.com/googleapis/nodejs-orchestration-airflow/issues/46)) ([8050138](https://github.com/googleapis/nodejs-orchestration-airflow/commit/8050138459f45ca557dee0a38ecc82962c4b8da2)) + ## 1.0.0 (2021-09-30) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index f221fe3108a..d43e7c526d7 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/orchestration-airflow", - "version": "1.0.0", + "version": "2.0.0", "description": "orchestration-airflow client for Node.js", "repository": "googleapis/nodejs-orchestration-airflow", "license": "Apache-2.0", diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json index 50ac9d11134..548fa65f438 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "1.0.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json index 0da30cc0c36..2f61d9af756 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "1.0.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json index c55f7636102..6f7a1410d67 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/package.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/orchestration-airflow": "^1.0.0" + "@google-cloud/orchestration-airflow": "^2.0.0" }, "devDependencies": { "c8": "^7.1.0", From c6faa6a110f5e87388b4d8a86b63ca47d21a6952 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 17:24:58 -0700 Subject: [PATCH 30/48] feat: support regapic LRO (#51) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support regapic LRO Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/environments_client.ts | 40 +++++++++++++------ .../src/v1/image_versions_client.ts | 11 +++-- .../src/v1beta1/environments_client.ts | 40 +++++++++++++------ .../src/v1beta1/image_versions_client.ts | 11 +++-- 4 files changed, 66 insertions(+), 36 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index 1f05b033749..db7b83a590a 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -72,7 +73,7 @@ export class EnvironmentsClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -95,11 +96,10 @@ export class EnvironmentsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -183,16 +183,32 @@ export class EnvironmentsClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const createEnvironmentResponse = protoFilesRoot.lookup( '.google.cloud.orchestration.airflow.service.v1.Environment' diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index eba22408f70..bac54560ac4 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -70,7 +70,7 @@ export class ImageVersionsClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -93,11 +93,10 @@ export class ImageVersionsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index d7442d1dc5f..a8090549536 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -72,7 +73,7 @@ export class EnvironmentsClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -95,11 +96,10 @@ export class EnvironmentsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -183,16 +183,32 @@ export class EnvironmentsClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1beta1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1beta1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1beta1/{name=projects/*/locations/*}/operations', + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const createEnvironmentResponse = protoFilesRoot.lookup( '.google.cloud.orchestration.airflow.service.v1beta1.Environment' diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index ecbc6e3c58e..309b19138ec 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -70,7 +70,7 @@ export class ImageVersionsClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -93,11 +93,10 @@ export class ImageVersionsClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From 050e62b830f46ad78a4a9dac4c3420f360083622 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:08:34 +0000 Subject: [PATCH 31/48] chore(main): release 2.1.0 (#52) :robot: I have created a release *beep* *boop* --- ## [2.1.0](https://github.com/googleapis/nodejs-orchestration-airflow/compare/v2.0.0...v2.1.0) (2022-06-30) ### Features * support regapic LRO ([#51](https://github.com/googleapis/nodejs-orchestration-airflow/issues/51)) ([6061472](https://github.com/googleapis/nodejs-orchestration-airflow/commit/60614729ab1fbc7885d2b07baff89cb8e052d2fa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .../CHANGELOG.md | 7 +++++++ .../package.json | 2 +- ...data.google.cloud.orchestration.airflow.service.v1.json | 2 +- ...google.cloud.orchestration.airflow.service.v1beta1.json | 2 +- .../samples/package.json | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md index d0c30b727b8..7f965bd0562 100644 --- a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md +++ b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/nodejs-orchestration-airflow/compare/v2.0.0...v2.1.0) (2022-06-30) + + +### Features + +* support regapic LRO ([#51](https://github.com/googleapis/nodejs-orchestration-airflow/issues/51)) ([6061472](https://github.com/googleapis/nodejs-orchestration-airflow/commit/60614729ab1fbc7885d2b07baff89cb8e052d2fa)) + ## [2.0.0](https://github.com/googleapis/nodejs-orchestration-airflow/compare/v1.0.0...v2.0.0) (2022-06-10) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index d43e7c526d7..24f6a1925ae 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/orchestration-airflow", - "version": "2.0.0", + "version": "2.1.0", "description": "orchestration-airflow client for Node.js", "repository": "googleapis/nodejs-orchestration-airflow", "license": "Apache-2.0", diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json index 548fa65f438..2316cb90099 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json index 2f61d9af756..5b0162ae00f 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json index 6f7a1410d67..f5fcfad2cf2 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/package.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/orchestration-airflow": "^2.0.0" + "@google-cloud/orchestration-airflow": "^2.1.0" }, "devDependencies": { "c8": "^7.1.0", From 94105ef57b6d4486d488061929aa3f3db3aa721e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 02:00:35 +0200 Subject: [PATCH 32/48] chore(deps): update dependency linkinator to v4 (#56) 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-orchestration-airflow). --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 24f6a1925ae..5eabdd66007 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -50,7 +50,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.13.6", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From 8927796f2697d6e4d2c3806a933f01461b3f1e96 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 20:20:30 +0000 Subject: [PATCH 33/48] chore: remove unused proto imports (#62) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: https://github.com/googleapis/googleapis/commit/cfa1b3782da7ccae31673d45401a0b79d2d4a84b Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9 --- .../cloud/orchestration/airflow/service/v1/operations.proto | 1 - .../cloud/orchestration/airflow/service/v1beta1/operations.proto | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/operations.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/operations.proto index 5d452fd5ee7..9bb3a05dd10 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/operations.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/operations.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.cloud.orchestration.airflow.service.v1; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1;service"; option java_multiple_files = true; diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto index 00b4d21d745..5e5991f0c67 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.cloud.orchestration.airflow.service.v1beta1; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1beta1;service"; option java_multiple_files = true; From d64bfb4bfc777e47613c244bb08fb689a7a7affa 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:12:15 +0000 Subject: [PATCH 34/48] fix: better support for fallback mode (#63) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../v1/environments.create_environment.js | 3 + .../v1/environments.delete_environment.js | 3 + .../v1/environments.get_environment.js | 3 + .../v1/environments.list_environments.js | 3 + .../v1/environments.update_environment.js | 3 + .../v1/image_versions.list_image_versions.js | 3 + ...loud.orchestration.airflow.service.v1.json | 12 +- .../v1beta1/environments.check_upgrade.js | 3 + .../environments.create_environment.js | 3 + .../environments.delete_environment.js | 3 + .../v1beta1/environments.get_environment.js | 3 + .../v1beta1/environments.list_environments.js | 3 + .../environments.restart_web_server.js | 3 + .../environments.update_environment.js | 3 + .../image_versions.list_image_versions.js | 3 + ...orchestration.airflow.service.v1beta1.json | 16 +- .../src/v1/environments_client.ts | 14 +- .../src/v1/image_versions_client.ts | 8 +- .../src/v1beta1/environments_client.ts | 18 +- .../src/v1beta1/image_versions_client.ts | 8 +- .../test/gapic_environments_v1.ts | 156 ++++++++--------- .../test/gapic_environments_v1beta1.ts | 160 +++++++++--------- .../test/gapic_image_versions_v1.ts | 158 ++++++++--------- .../test/gapic_image_versions_v1beta1.ts | 160 +++++++++--------- 24 files changed, 402 insertions(+), 350 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js index 32b86a82643..facdb566575 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1_generated_Environments_CreateEnvironment_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-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js index 10a3315e766..74dccacbe5e 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1_generated_Environments_DeleteEnvironment_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-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js index 910fafc8db1..56aadc4191b 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1_generated_Environments_GetEnvironment_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-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js index 7bd6c6d1a21..0d6aaaca77d 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1_generated_Environments_ListEnvironments_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-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js index 073745153ec..3de9c9b3aaa 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1_generated_Environments_UpdateEnvironment_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-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js index 8d7bb957f4f..718176b5a60 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1_generated_ImageVersions_ListImageVersions_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-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json index 2316cb90099..0ca4e93055a 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -106,7 +106,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 163, + "end": 166, "type": "FULL" } ], @@ -202,7 +202,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -242,7 +242,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js index a3e8726127a..b0aa2ef8ea5 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1beta1_generated_Environments_CheckUpgrade_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-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js index f06ea9a0708..914230cd8da 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1beta1_generated_Environments_CreateEnvironment_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-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js index 47130b7bacd..53a3ec8a1e4 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1beta1_generated_Environments_DeleteEnvironment_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-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js index 282f8ac30d6..24507c3803b 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1beta1_generated_Environments_GetEnvironment_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-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js index 7f956d6dfe0..cf9ae5d160f 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1beta1_generated_Environments_ListEnvironments_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-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js index db0b88f24d6..dc26ccf4c01 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1beta1_generated_Environments_RestartWebServer_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-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js index 615556a434f..01ae22759d4 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js @@ -23,6 +23,9 @@ function main(updateMask) { // [START composer_v1beta1_generated_Environments_UpdateEnvironment_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-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js index f6364d9d5dc..ca3b5cb3208 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js @@ -23,6 +23,9 @@ function main() { // [START composer_v1beta1_generated_ImageVersions_ListImageVersions_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-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json index 5b0162ae00f..bace47d4f05 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -106,7 +106,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 180, + "end": 183, "type": "FULL" } ], @@ -202,7 +202,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -242,7 +242,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -282,7 +282,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -326,7 +326,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index db7b83a590a..0c1dba7facc 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -326,7 +325,8 @@ export class EnvironmentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -620,7 +620,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.orchestration.airflow.service.v1.Environment, @@ -875,7 +875,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.orchestration.airflow.service.v1.Environment, @@ -1013,7 +1013,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1159,7 +1159,7 @@ export class EnvironmentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.createStream( - this.innerApiCalls.listEnvironments as gax.GaxCall, + this.innerApiCalls.listEnvironments as GaxCall, request, callSettings ); @@ -1208,7 +1208,7 @@ export class EnvironmentsClient { this.initialize(); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index bac54560ac4..76640bfc740 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -28,7 +28,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -249,7 +248,8 @@ export class ImageVersionsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -455,7 +455,7 @@ export class ImageVersionsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listImageVersions.createStream( - this.innerApiCalls.listImageVersions as gax.GaxCall, + this.innerApiCalls.listImageVersions as GaxCall, request, callSettings ); @@ -506,7 +506,7 @@ export class ImageVersionsClient { this.initialize(); return this.descriptors.page.listImageVersions.asyncIterate( this.innerApiCalls['listImageVersions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index a8090549536..88d64c071ce 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -350,7 +349,8 @@ export class EnvironmentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -644,7 +644,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, @@ -915,7 +915,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, @@ -1053,7 +1053,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1192,7 +1192,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.restartWebServer, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, @@ -1354,7 +1354,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.checkUpgrade, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse, @@ -1500,7 +1500,7 @@ export class EnvironmentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.createStream( - this.innerApiCalls.listEnvironments as gax.GaxCall, + this.innerApiCalls.listEnvironments as GaxCall, request, callSettings ); @@ -1549,7 +1549,7 @@ export class EnvironmentsClient { this.initialize(); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index 309b19138ec..5773a42aa77 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -28,7 +28,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -249,7 +248,8 @@ export class ImageVersionsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -455,7 +455,7 @@ export class ImageVersionsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listImageVersions.createStream( - this.innerApiCalls.listImageVersions as gax.GaxCall, + this.innerApiCalls.listImageVersions as GaxCall, request, callSettings ); @@ -506,7 +506,7 @@ export class ImageVersionsClient { this.initialize(); return this.descriptors.page.listImageVersions.asyncIterate( this.innerApiCalls['listImageVersions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts index 958c016a6eb..9ecbce2246f 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts @@ -145,99 +145,101 @@ function stubAsyncIterationCall( } describe('v1.EnvironmentsClient', () => { - it('has servicePath', () => { - const servicePath = environmentsModule.v1.EnvironmentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = environmentsModule.v1.EnvironmentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = environmentsModule.v1.EnvironmentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new environmentsModule.v1.EnvironmentsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = environmentsModule.v1.EnvironmentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = environmentsModule.v1.EnvironmentsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = environmentsModule.v1.EnvironmentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.environmentsStub, undefined); - await client.initialize(); - assert(client.environmentsStub); - }); - it('has close method for the initialized client', done => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new environmentsModule.v1.EnvironmentsClient(); + assert(client); }); - client.initialize(); - assert(client.environmentsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + await client.initialize(); + assert(client.environmentsStub); }); - assert.strictEqual(client.environmentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.environmentsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + client.close().then(() => { + done(); + }); }); - 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 environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v1.EnvironmentsClient({ + 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() - .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 environmentsModule.v1.EnvironmentsClient({ + 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('getEnvironment', () => { diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts index ecbc8f87765..f84ac6de24b 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts @@ -145,101 +145,103 @@ function stubAsyncIterationCall( } describe('v1beta1.EnvironmentsClient', () => { - it('has servicePath', () => { - const servicePath = - environmentsModule.v1beta1.EnvironmentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - environmentsModule.v1beta1.EnvironmentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = environmentsModule.v1beta1.EnvironmentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + environmentsModule.v1beta1.EnvironmentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + environmentsModule.v1beta1.EnvironmentsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = environmentsModule.v1beta1.EnvironmentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.environmentsStub, undefined); - await client.initialize(); - assert(client.environmentsStub); - }); - it('has close method for the initialized client', done => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient(); + assert(client); }); - client.initialize(); - assert(client.environmentsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + await client.initialize(); + assert(client.environmentsStub); }); - assert.strictEqual(client.environmentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.environmentsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + client.close().then(() => { + done(); + }); }); - 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 environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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() - .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 environmentsModule.v1beta1.EnvironmentsClient({ + 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('getEnvironment', () => { diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts index c31fcf74c08..757dfd84c18 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts @@ -113,99 +113,103 @@ function stubAsyncIterationCall( } describe('v1.ImageVersionsClient', () => { - it('has servicePath', () => { - const servicePath = imageversionsModule.v1.ImageVersionsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = imageversionsModule.v1.ImageVersionsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = imageversionsModule.v1.ImageVersionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new imageversionsModule.v1.ImageVersionsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + imageversionsModule.v1.ImageVersionsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + imageversionsModule.v1.ImageVersionsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = imageversionsModule.v1.ImageVersionsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.imageVersionsStub, undefined); - await client.initialize(); - assert(client.imageVersionsStub); - }); - it('has close method for the initialized client', done => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new imageversionsModule.v1.ImageVersionsClient(); + assert(client); }); - client.initialize(); - assert(client.imageVersionsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + await client.initialize(); + assert(client.imageVersionsStub); }); - assert.strictEqual(client.imageVersionsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageVersionsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + client.close().then(() => { + done(); + }); }); - 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 imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageversionsModule.v1.ImageVersionsClient({ + 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() - .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 imageversionsModule.v1.ImageVersionsClient({ + 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('listImageVersions', () => { diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts index a6f4473cfd0..6117a714eac 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts @@ -113,101 +113,103 @@ function stubAsyncIterationCall( } describe('v1beta1.ImageVersionsClient', () => { - it('has servicePath', () => { - const servicePath = - imageversionsModule.v1beta1.ImageVersionsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - imageversionsModule.v1beta1.ImageVersionsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = imageversionsModule.v1beta1.ImageVersionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + imageversionsModule.v1beta1.ImageVersionsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + imageversionsModule.v1beta1.ImageVersionsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = imageversionsModule.v1beta1.ImageVersionsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.imageVersionsStub, undefined); - await client.initialize(); - assert(client.imageVersionsStub); - }); - it('has close method for the initialized client', done => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient(); + assert(client); }); - client.initialize(); - assert(client.imageVersionsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + await client.initialize(); + assert(client.imageVersionsStub); }); - assert.strictEqual(client.imageVersionsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageVersionsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + client.close().then(() => { + done(); + }); }); - 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 imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + 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() - .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 imageversionsModule.v1beta1.ImageVersionsClient({ + 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('listImageVersions', () => { From cff61537010696abacad59a34eeba537ebc106d2 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:29 +0000 Subject: [PATCH 35/48] fix: change import long to require (#64) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../protos/protos.d.ts | 768 ++- .../protos/protos.js | 5000 ++++++++++++----- .../protos/protos.json | 24 + 3 files changed, 4267 insertions(+), 1525 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index d3c75a61ca6..b6a079bbb41 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/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 { @@ -126,35 +126,35 @@ export namespace google { namespace Environments { /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#createEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createEnvironment}. * @param error Error, if any * @param [response] Operation */ type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#getEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getEnvironment}. * @param error Error, if any * @param [response] Environment */ type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.Environment) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#listEnvironments}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listEnvironments}. * @param error Error, if any * @param [response] ListEnvironmentsResponse */ type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#updateEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateEnvironment}. * @param error Error, if any * @param [response] Operation */ type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#deleteEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteEnvironment}. * @param error Error, if any * @param [response] Operation */ @@ -255,6 +255,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetEnvironmentRequest. */ @@ -345,6 +352,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListEnvironmentsRequest. */ @@ -447,6 +461,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListEnvironmentsResponse. */ @@ -543,6 +564,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteEnvironmentRequest. */ @@ -633,6 +661,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateEnvironmentRequest. */ @@ -735,6 +770,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnvironmentConfig. */ @@ -885,6 +927,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnvironmentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WebServerNetworkAccessControl. */ @@ -975,6 +1024,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerNetworkAccessControl + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WebServerNetworkAccessControl { @@ -1073,6 +1129,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1164,6 +1227,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WebServerConfig. */ @@ -1254,6 +1324,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EncryptionConfig. */ @@ -1344,6 +1421,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SoftwareConfig. */ @@ -1458,6 +1542,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoftwareConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a IPAllocationPolicy. */ @@ -1578,6 +1669,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IPAllocationPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NodeConfig. */ @@ -1716,6 +1814,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrivateClusterConfig. */ @@ -1818,6 +1923,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateClusterConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrivateEnvironmentConfig. */ @@ -1932,6 +2044,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateEnvironmentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Environment. */ @@ -2058,6 +2177,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Environment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Environment { @@ -2185,6 +2311,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckUpgradeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CheckUpgradeResponse { @@ -2235,7 +2368,7 @@ export namespace google { namespace ImageVersions { /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions#listImageVersions}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions|listImageVersions}. * @param error Error, if any * @param [response] ListImageVersionsResponse */ @@ -2348,6 +2481,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListImageVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListImageVersionsResponse. */ @@ -2444,6 +2584,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListImageVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ImageVersion. */ @@ -2564,6 +2711,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationMetadata. */ @@ -2684,6 +2838,13 @@ export namespace google { * @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; } namespace OperationMetadata { @@ -2834,49 +2995,49 @@ export namespace google { namespace Environments { /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#createEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createEnvironment}. * @param error Error, if any * @param [response] Operation */ type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#getEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getEnvironment}. * @param error Error, if any * @param [response] Environment */ type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.Environment) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#listEnvironments}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listEnvironments}. * @param error Error, if any * @param [response] ListEnvironmentsResponse */ type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#updateEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateEnvironment}. * @param error Error, if any * @param [response] Operation */ type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#deleteEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteEnvironment}. * @param error Error, if any * @param [response] Operation */ type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#restartWebServer}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|restartWebServer}. * @param error Error, if any * @param [response] Operation */ type RestartWebServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#checkUpgrade}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|checkUpgrade}. * @param error Error, if any * @param [response] Operation */ @@ -2977,6 +3138,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetEnvironmentRequest. */ @@ -3067,6 +3235,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListEnvironmentsRequest. */ @@ -3169,6 +3344,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListEnvironmentsResponse. */ @@ -3265,6 +3447,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteEnvironmentRequest. */ @@ -3355,6 +3544,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateEnvironmentRequest. */ @@ -3457,6 +3653,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RestartWebServerRequest. */ @@ -3547,6 +3750,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestartWebServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnvironmentConfig. */ @@ -3715,6 +3925,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnvironmentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnvironmentConfig { @@ -3816,6 +4033,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerNetworkAccessControl + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WebServerNetworkAccessControl { @@ -3914,6 +4138,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4029,6 +4260,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoftwareConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a IPAllocationPolicy. */ @@ -4143,6 +4381,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IPAllocationPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NodeConfig. */ @@ -4287,6 +4532,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrivateClusterConfig. */ @@ -4389,6 +4641,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateClusterConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrivateEnvironmentConfig. */ @@ -4515,6 +4774,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateEnvironmentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DatabaseConfig. */ @@ -4605,6 +4871,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WebServerConfig. */ @@ -4695,6 +4968,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EncryptionConfig. */ @@ -4785,6 +5065,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MaintenanceWindow. */ @@ -4887,6 +5174,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenanceWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WorkloadsConfig. */ @@ -4989,6 +5283,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WorkloadsConfig { @@ -5099,6 +5400,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchedulerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WebServerResource. */ @@ -5201,6 +5509,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WorkerResource. */ @@ -5315,6 +5630,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5442,6 +5764,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Environment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Environment { @@ -5551,6 +5880,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckUpgradeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CheckUpgradeResponse. */ @@ -5665,6 +6001,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckUpgradeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CheckUpgradeResponse { @@ -5715,7 +6058,7 @@ export namespace google { namespace ImageVersions { /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions#listImageVersions}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions|listImageVersions}. * @param error Error, if any * @param [response] ListImageVersionsResponse */ @@ -5828,6 +6171,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListImageVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListImageVersionsResponse. */ @@ -5924,6 +6274,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListImageVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ImageVersion. */ @@ -6044,6 +6401,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationMetadata. */ @@ -6164,6 +6528,13 @@ export namespace google { * @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; } namespace OperationMetadata { @@ -6289,6 +6660,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. */ @@ -6436,6 +6814,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. */ @@ -6532,6 +6917,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. */ @@ -6670,6 +7062,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 { @@ -6782,6 +7181,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; } } @@ -6876,6 +7282,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. */ @@ -6916,6 +7329,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -6963,6 +7379,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 @@ -7032,6 +7451,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. */ @@ -7176,6 +7602,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 { @@ -7280,6 +7713,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. */ @@ -7376,6 +7816,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; } } @@ -7467,6 +7914,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. */ @@ -7617,6 +8071,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 { @@ -7745,6 +8206,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. */ @@ -7859,6 +8327,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 { @@ -7957,6 +8432,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; } } @@ -8060,6 +8542,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. */ @@ -8162,6 +8651,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. */ @@ -8282,6 +8778,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. */ @@ -8495,6 +8998,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 { @@ -8622,6 +9132,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. */ @@ -8639,6 +9156,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -8676,6 +9196,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -8754,6 +9277,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 { @@ -8861,6 +9391,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. */ @@ -8963,6 +9500,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. */ @@ -9059,6 +9603,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. */ @@ -9161,6 +9712,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. */ @@ -9272,6 +9830,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 { @@ -9408,6 +9973,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 { @@ -9506,6 +10078,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; } } @@ -9597,6 +10176,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 { @@ -9713,6 +10299,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; } } @@ -9804,6 +10397,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 { @@ -9822,6 +10422,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. */ @@ -9845,6 +10448,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 @@ -9914,6 +10520,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 + } } } @@ -10011,6 +10634,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Duration. */ @@ -10107,6 +10737,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -10191,6 +10828,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. */ @@ -10281,6 +10925,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. */ @@ -10377,6 +11028,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; } } @@ -10477,35 +11135,35 @@ export namespace google { namespace Operations { /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @param error Error, if any * @param [response] ListOperationsResponse */ type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @param error Error, if any * @param [response] Operation */ type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @param error Error, if any * @param [response] Empty */ type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @param error Error, if any * @param [response] Empty */ type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @param error Error, if any * @param [response] Operation */ @@ -10627,6 +11285,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -10717,6 +11382,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -10825,6 +11497,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -10921,6 +11600,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -11011,6 +11697,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -11101,6 +11794,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -11197,6 +11897,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -11293,6 +12000,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11399,6 +12113,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11505,6 +12226,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index 958ee917ec7..24fb2e5d2c2 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -117,7 +117,7 @@ }; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#createEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createEnvironment}. * @memberof google.cloud.orchestration.airflow.service.v1.Environments * @typedef CreateEnvironmentCallback * @type {function} @@ -150,7 +150,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#getEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getEnvironment}. * @memberof google.cloud.orchestration.airflow.service.v1.Environments * @typedef GetEnvironmentCallback * @type {function} @@ -183,7 +183,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#listEnvironments}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listEnvironments}. * @memberof google.cloud.orchestration.airflow.service.v1.Environments * @typedef ListEnvironmentsCallback * @type {function} @@ -216,7 +216,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#updateEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateEnvironment}. * @memberof google.cloud.orchestration.airflow.service.v1.Environments * @typedef UpdateEnvironmentCallback * @type {function} @@ -249,7 +249,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments#deleteEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteEnvironment}. * @memberof google.cloud.orchestration.airflow.service.v1.Environments * @typedef DeleteEnvironmentCallback * @type {function} @@ -387,12 +387,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -496,6 +498,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest"; + }; + return CreateEnvironmentRequest; })(); @@ -591,9 +608,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; @@ -683,6 +701,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest"; + }; + return GetEnvironmentRequest; })(); @@ -800,15 +833,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; @@ -915,6 +951,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListEnvironmentsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest"; + }; + return ListEnvironmentsRequest; })(); @@ -1023,14 +1074,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1146,6 +1199,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListEnvironmentsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse"; + }; + return ListEnvironmentsResponse; })(); @@ -1241,9 +1309,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; @@ -1333,6 +1402,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest"; + }; + return DeleteEnvironmentRequest; })(); @@ -1450,15 +1534,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.name = reader.string(); - break; - case 1: - message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 2: { + message.name = reader.string(); + break; + } + case 1: { + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1575,6 +1662,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest"; + }; + return UpdateEnvironmentRequest; })(); @@ -1780,39 +1882,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gkeCluster = reader.string(); - break; - case 2: - message.dagGcsPrefix = reader.string(); - break; - case 3: - message.nodeCount = reader.int32(); - break; - case 4: - message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.decode(reader, reader.uint32()); - break; - case 5: - message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.decode(reader, reader.uint32()); - break; - case 7: - message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); - break; - case 8: - message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); - break; - case 9: - message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.decode(reader, reader.uint32()); - break; - case 10: - message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.decode(reader, reader.uint32()); - break; - case 11: - message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.decode(reader, reader.uint32()); - break; - case 6: - message.airflowUri = reader.string(); - break; + case 1: { + message.gkeCluster = reader.string(); + break; + } + case 2: { + message.dagGcsPrefix = reader.string(); + break; + } + case 3: { + message.nodeCount = reader.int32(); + break; + } + case 4: { + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); + break; + } + case 9: { + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.airflowUri = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2018,6 +2131,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnvironmentConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.EnvironmentConfig"; + }; + return EnvironmentConfig; })(); @@ -2115,11 +2243,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.allowedIpRanges && message.allowedIpRanges.length)) - message.allowedIpRanges = []; - message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.allowedIpRanges && message.allowedIpRanges.length)) + message.allowedIpRanges = []; + message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -2226,6 +2355,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebServerNetworkAccessControl + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerNetworkAccessControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl"; + }; + WebServerNetworkAccessControl.AllowedIpRange = (function() { /** @@ -2329,12 +2473,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; - case 2: - message.description = reader.string(); - break; + case 1: { + message.value = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2433,6 +2579,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AllowedIpRange + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange"; + }; + return AllowedIpRange; })(); @@ -2531,9 +2692,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.machineType = reader.string(); - break; + case 1: { + message.machineType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2623,6 +2785,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DatabaseConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DatabaseConfig"; + }; + return DatabaseConfig; })(); @@ -2718,9 +2895,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.machineType = reader.string(); - break; + case 1: { + message.machineType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2810,6 +2988,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebServerConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerConfig"; + }; + return WebServerConfig; })(); @@ -2905,9 +3098,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kmsKeyName = reader.string(); - break; + case 1: { + message.kmsKeyName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2997,6 +3191,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.EncryptionConfig"; + }; + return EncryptionConfig; })(); @@ -3142,78 +3351,83 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.imageVersion = reader.string(); - break; - case 2: - if (message.airflowConfigOverrides === $util.emptyObject) - message.airflowConfigOverrides = {}; - 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.imageVersion = reader.string(); + break; + } + case 2: { + if (message.airflowConfigOverrides === $util.emptyObject) + message.airflowConfigOverrides = {}; + 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.airflowConfigOverrides[key] = value; + break; } - message.airflowConfigOverrides[key] = value; - break; - case 3: - if (message.pypiPackages === $util.emptyObject) - message.pypiPackages = {}; - 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 3: { + if (message.pypiPackages === $util.emptyObject) + message.pypiPackages = {}; + 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.pypiPackages[key] = value; + break; } - message.pypiPackages[key] = value; - break; - case 4: - if (message.envVariables === $util.emptyObject) - message.envVariables = {}; - 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 4: { + if (message.envVariables === $util.emptyObject) + message.envVariables = {}; + 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.envVariables[key] = value; + break; + } + case 6: { + message.pythonVersion = reader.string(); + break; } - message.envVariables[key] = value; - break; - case 6: - message.pythonVersion = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -3378,6 +3592,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SoftwareConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoftwareConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.SoftwareConfig"; + }; + return SoftwareConfig; })(); @@ -3542,21 +3771,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.useIpAliases = reader.bool(); - break; - case 2: - message.clusterSecondaryRangeName = reader.string(); - break; - case 4: - message.clusterIpv4CidrBlock = reader.string(); - break; - case 3: - message.servicesSecondaryRangeName = reader.string(); - break; - case 5: - message.servicesIpv4CidrBlock = reader.string(); - break; + case 1: { + message.useIpAliases = reader.bool(); + break; + } + case 2: { + message.clusterSecondaryRangeName = reader.string(); + break; + } + case 4: { + message.clusterIpv4CidrBlock = reader.string(); + break; + } + case 3: { + message.servicesSecondaryRangeName = reader.string(); + break; + } + case 5: { + message.servicesIpv4CidrBlock = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3699,6 +3933,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IPAllocationPolicy + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy"; + }; + return IPAllocationPolicy; })(); @@ -3886,37 +4135,46 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.location = reader.string(); - break; - case 2: - message.machineType = reader.string(); - break; - case 3: - message.network = reader.string(); - break; - case 4: - message.subnetwork = reader.string(); - break; - case 5: - message.diskSizeGb = reader.int32(); - break; - case 6: - if (!(message.oauthScopes && message.oauthScopes.length)) - message.oauthScopes = []; - message.oauthScopes.push(reader.string()); - break; - case 7: - message.serviceAccount = reader.string(); - break; - case 8: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 9: - message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.decode(reader, reader.uint32()); - break; + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.machineType = reader.string(); + break; + } + case 3: { + message.network = reader.string(); + break; + } + case 4: { + message.subnetwork = reader.string(); + break; + } + case 5: { + message.diskSizeGb = reader.int32(); + break; + } + case 6: { + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + } + case 7: { + message.serviceAccount = reader.string(); + break; + } + case 8: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 9: { + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4102,6 +4360,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NodeConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.NodeConfig"; + }; + return NodeConfig; })(); @@ -4219,15 +4492,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.enablePrivateEndpoint = reader.bool(); - break; - case 2: - message.masterIpv4CidrBlock = reader.string(); - break; - case 3: - message.masterIpv4ReservedRange = reader.string(); - break; + case 1: { + message.enablePrivateEndpoint = reader.bool(); + break; + } + case 2: { + message.masterIpv4CidrBlock = reader.string(); + break; + } + case 3: { + message.masterIpv4ReservedRange = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4334,6 +4610,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrivateClusterConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig"; + }; + return PrivateClusterConfig; })(); @@ -4473,21 +4764,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.enablePrivateEnvironment = reader.bool(); - break; - case 2: - message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - case 3: - message.webServerIpv4CidrBlock = reader.string(); - break; - case 4: - message.cloudSqlIpv4CidrBlock = reader.string(); - break; - case 5: - message.webServerIpv4ReservedRange = reader.string(); - break; + case 1: { + message.enablePrivateEnvironment = reader.bool(); + break; + } + case 2: { + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.webServerIpv4CidrBlock = reader.string(); + break; + } + case 4: { + message.cloudSqlIpv4CidrBlock = reader.string(); + break; + } + case 5: { + message.webServerIpv4ReservedRange = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4615,6 +4911,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrivateEnvironmentConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateEnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig"; + }; + return PrivateEnvironmentConfig; })(); @@ -4778,46 +5089,53 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.decode(reader, reader.uint32()); - break; - case 3: - message.uuid = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.uuid = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -5019,6 +5337,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Environment + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.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.orchestration.airflow.service.v1.Environment"; + }; + /** * State enum. * @name google.cloud.orchestration.airflow.service.v1.Environment.State @@ -5182,40 +5515,45 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.buildLogUri = reader.string(); - break; - case 4: - message.containsPypiModulesConflict = reader.int32(); - break; - case 3: - message.pypiConflictBuildLogExtract = reader.string(); - break; - case 5: - message.imageVersion = reader.string(); - break; - case 6: - if (message.pypiDependencies === $util.emptyObject) - message.pypiDependencies = {}; - 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.buildLogUri = reader.string(); + break; + } + case 4: { + message.containsPypiModulesConflict = reader.int32(); + break; + } + case 3: { + message.pypiConflictBuildLogExtract = reader.string(); + break; + } + case 5: { + message.imageVersion = reader.string(); + break; + } + case 6: { + if (message.pypiDependencies === $util.emptyObject) + message.pypiDependencies = {}; + 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.pypiDependencies[key] = value; + break; } - message.pypiDependencies[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -5371,6 +5709,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CheckUpgradeResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckUpgradeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse"; + }; + /** * ConflictResult enum. * @name google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult @@ -5423,7 +5776,7 @@ }; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions#listImageVersions}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions|listImageVersions}. * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions * @typedef ListImageVersionsCallback * @type {function} @@ -5583,18 +5936,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.includePastReleases = reader.bool(); - 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.includePastReleases = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -5709,6 +6066,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListImageVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListImageVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest"; + }; + return ListImageVersionsRequest; })(); @@ -5817,14 +6189,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.imageVersions && message.imageVersions.length)) - message.imageVersions = []; - message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1.ImageVersion.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.imageVersions && message.imageVersions.length)) + message.imageVersions = []; + message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1.ImageVersion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5940,6 +6314,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListImageVersionsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListImageVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse"; + }; + return ListImageVersionsResponse; })(); @@ -6092,26 +6481,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.imageVersionId = reader.string(); - break; - case 2: - message.isDefault = reader.bool(); - break; - case 3: - if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) - message.supportedPythonVersions = []; - message.supportedPythonVersions.push(reader.string()); - break; - case 4: - message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - case 5: - message.creationDisabled = reader.bool(); - break; - case 6: - message.upgradeDisabled = reader.bool(); - break; + case 1: { + message.imageVersionId = reader.string(); + break; + } + case 2: { + message.isDefault = reader.bool(); + break; + } + case 3: { + if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) + message.supportedPythonVersions = []; + message.supportedPythonVersions.push(reader.string()); + break; + } + case 4: { + message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.creationDisabled = reader.bool(); + break; + } + case 6: { + message.upgradeDisabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6260,6 +6655,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ImageVersion + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ImageVersion"; + }; + return ImageVersion; })(); @@ -6410,24 +6820,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.operationType = reader.int32(); - break; - case 3: - message.resource = reader.string(); - break; - case 4: - message.resourceUuid = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.operationType = reader.int32(); + break; + } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.resourceUuid = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6629,6 +7045,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.OperationMetadata"; + }; + /** * State enum. * @name google.cloud.orchestration.airflow.service.v1.OperationMetadata.State @@ -6719,7 +7150,7 @@ }; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#createEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createEnvironment}. * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments * @typedef CreateEnvironmentCallback * @type {function} @@ -6752,7 +7183,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#getEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getEnvironment}. * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments * @typedef GetEnvironmentCallback * @type {function} @@ -6785,7 +7216,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#listEnvironments}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listEnvironments}. * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments * @typedef ListEnvironmentsCallback * @type {function} @@ -6818,7 +7249,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#updateEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateEnvironment}. * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments * @typedef UpdateEnvironmentCallback * @type {function} @@ -6851,7 +7282,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#deleteEnvironment}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteEnvironment}. * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments * @typedef DeleteEnvironmentCallback * @type {function} @@ -6884,7 +7315,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#restartWebServer}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|restartWebServer}. * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments * @typedef RestartWebServerCallback * @type {function} @@ -6917,7 +7348,7 @@ */ /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments#checkUpgrade}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|checkUpgrade}. * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments * @typedef CheckUpgradeCallback * @type {function} @@ -7055,12 +7486,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7164,6 +7597,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest"; + }; + return CreateEnvironmentRequest; })(); @@ -7259,9 +7707,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; @@ -7351,6 +7800,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest"; + }; + return GetEnvironmentRequest; })(); @@ -7468,15 +7932,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; @@ -7583,6 +8050,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListEnvironmentsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest"; + }; + return ListEnvironmentsRequest; })(); @@ -7691,14 +8173,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7814,6 +8298,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListEnvironmentsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse"; + }; + return ListEnvironmentsResponse; })(); @@ -7909,9 +8408,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; @@ -8001,6 +8501,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest"; + }; + return DeleteEnvironmentRequest; })(); @@ -8118,15 +8633,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.name = reader.string(); - break; - case 1: - message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 2: { + message.name = reader.string(); + break; + } + case 1: { + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8243,6 +8761,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest"; + }; + return UpdateEnvironmentRequest; })(); @@ -8338,9 +8871,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; @@ -8430,6 +8964,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RestartWebServerRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestartWebServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest"; + }; + return RestartWebServerRequest; })(); @@ -8668,48 +9217,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.gkeCluster = reader.string(); - break; - case 2: - message.dagGcsPrefix = reader.string(); - break; - case 3: - message.nodeCount = reader.int32(); - break; - case 4: - message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.decode(reader, reader.uint32()); - break; - case 5: - message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.decode(reader, reader.uint32()); - break; - case 7: - message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); - break; - case 9: - message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); - break; - case 10: - message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.decode(reader, reader.uint32()); - break; - case 11: - message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.decode(reader, reader.uint32()); - break; - case 6: - message.airflowUri = reader.string(); - break; - case 12: - message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.decode(reader, reader.uint32()); - break; - case 13: - message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.decode(reader, reader.uint32()); - break; - case 15: - message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.decode(reader, reader.uint32()); - break; - case 16: - message.environmentSize = reader.int32(); - break; + case 1: { + message.gkeCluster = reader.string(); + break; + } + case 2: { + message.dagGcsPrefix = reader.string(); + break; + } + case 3: { + message.nodeCount = reader.int32(); + break; + } + case 4: { + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); + break; + } + case 10: { + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.airflowUri = reader.string(); + break; + } + case 12: { + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + case 13: { + message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 15: { + message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.decode(reader, reader.uint32()); + break; + } + case 16: { + message.environmentSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -8972,6 +9535,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnvironmentConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig"; + }; + /** * EnvironmentSize enum. * @name google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize @@ -9087,11 +9665,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.allowedIpRanges && message.allowedIpRanges.length)) - message.allowedIpRanges = []; - message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.allowedIpRanges && message.allowedIpRanges.length)) + message.allowedIpRanges = []; + message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -9198,6 +9777,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebServerNetworkAccessControl + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerNetworkAccessControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl"; + }; + WebServerNetworkAccessControl.AllowedIpRange = (function() { /** @@ -9301,12 +9895,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; - case 2: - message.description = reader.string(); - break; + case 1: { + message.value = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9405,6 +10001,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AllowedIpRange + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange"; + }; + return AllowedIpRange; })(); @@ -9553,78 +10164,83 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.imageVersion = reader.string(); - break; - case 2: - if (message.airflowConfigOverrides === $util.emptyObject) - message.airflowConfigOverrides = {}; - 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.imageVersion = reader.string(); + break; + } + case 2: { + if (message.airflowConfigOverrides === $util.emptyObject) + message.airflowConfigOverrides = {}; + 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.airflowConfigOverrides[key] = value; + break; } - message.airflowConfigOverrides[key] = value; - break; - case 3: - if (message.pypiPackages === $util.emptyObject) - message.pypiPackages = {}; - 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 3: { + if (message.pypiPackages === $util.emptyObject) + message.pypiPackages = {}; + 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.pypiPackages[key] = value; + break; } - message.pypiPackages[key] = value; - break; - case 4: - if (message.envVariables === $util.emptyObject) - message.envVariables = {}; - 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 4: { + if (message.envVariables === $util.emptyObject) + message.envVariables = {}; + 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.envVariables[key] = value; + break; + } + case 6: { + message.pythonVersion = reader.string(); + break; } - message.envVariables[key] = value; - break; - case 6: - message.pythonVersion = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -9789,6 +10405,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SoftwareConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoftwareConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig"; + }; + return SoftwareConfig; })(); @@ -9928,21 +10559,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.useIpAliases = reader.bool(); - break; - case 2: - message.clusterSecondaryRangeName = reader.string(); - break; - case 3: - message.servicesSecondaryRangeName = reader.string(); - break; - case 4: - message.clusterIpv4CidrBlock = reader.string(); - break; - case 5: - message.servicesIpv4CidrBlock = reader.string(); - break; + case 1: { + message.useIpAliases = reader.bool(); + break; + } + case 2: { + message.clusterSecondaryRangeName = reader.string(); + break; + } + case 3: { + message.servicesSecondaryRangeName = reader.string(); + break; + } + case 4: { + message.clusterIpv4CidrBlock = reader.string(); + break; + } + case 5: { + message.servicesIpv4CidrBlock = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10065,6 +10701,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IPAllocationPolicy + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy"; + }; + return IPAllocationPolicy; })(); @@ -10263,42 +10914,52 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.location = reader.string(); - break; - case 2: - message.machineType = reader.string(); - break; - case 3: - message.network = reader.string(); - break; - case 4: - message.subnetwork = reader.string(); - break; - case 5: - message.diskSizeGb = reader.int32(); - break; - case 6: - if (!(message.oauthScopes && message.oauthScopes.length)) - message.oauthScopes = []; - message.oauthScopes.push(reader.string()); - break; - case 7: - message.serviceAccount = reader.string(); - break; - case 8: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 9: - message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.decode(reader, reader.uint32()); - break; - case 10: - message.maxPodsPerNode = reader.int32(); - break; - default: - reader.skipType(tag & 7); + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.machineType = reader.string(); + break; + } + case 3: { + message.network = reader.string(); + break; + } + case 4: { + message.subnetwork = reader.string(); + break; + } + case 5: { + message.diskSizeGb = reader.int32(); + break; + } + case 6: { + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + } + case 7: { + message.serviceAccount = reader.string(); + break; + } + case 8: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 9: { + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.decode(reader, reader.uint32()); + break; + } + case 10: { + message.maxPodsPerNode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -10490,6 +11151,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NodeConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.NodeConfig"; + }; + return NodeConfig; })(); @@ -10607,15 +11283,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.enablePrivateEndpoint = reader.bool(); - break; - case 2: - message.masterIpv4CidrBlock = reader.string(); - break; - case 3: - message.masterIpv4ReservedRange = reader.string(); - break; + case 1: { + message.enablePrivateEndpoint = reader.bool(); + break; + } + case 2: { + message.masterIpv4CidrBlock = reader.string(); + break; + } + case 3: { + message.masterIpv4ReservedRange = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10722,6 +11401,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrivateClusterConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig"; + }; + return PrivateClusterConfig; })(); @@ -10883,27 +11577,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.enablePrivateEnvironment = reader.bool(); - break; - case 2: - message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - case 3: - message.webServerIpv4CidrBlock = reader.string(); - break; - case 4: - message.cloudSqlIpv4CidrBlock = reader.string(); - break; - case 5: - message.webServerIpv4ReservedRange = reader.string(); - break; - case 7: - message.cloudComposerNetworkIpv4CidrBlock = reader.string(); - break; - case 8: - message.cloudComposerNetworkIpv4ReservedRange = reader.string(); - break; + case 1: { + message.enablePrivateEnvironment = reader.bool(); + break; + } + case 2: { + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.webServerIpv4CidrBlock = reader.string(); + break; + } + case 4: { + message.cloudSqlIpv4CidrBlock = reader.string(); + break; + } + case 5: { + message.webServerIpv4ReservedRange = reader.string(); + break; + } + case 7: { + message.cloudComposerNetworkIpv4CidrBlock = reader.string(); + break; + } + case 8: { + message.cloudComposerNetworkIpv4ReservedRange = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11047,6 +11748,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrivateEnvironmentConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateEnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig"; + }; + return PrivateEnvironmentConfig; })(); @@ -11142,9 +11858,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.machineType = reader.string(); - break; + case 1: { + message.machineType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11234,6 +11951,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DatabaseConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig"; + }; + return DatabaseConfig; })(); @@ -11329,9 +12061,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.machineType = reader.string(); - break; + case 1: { + message.machineType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11421,6 +12154,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebServerConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig"; + }; + return WebServerConfig; })(); @@ -11516,9 +12264,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kmsKeyName = reader.string(); - break; + case 1: { + message.kmsKeyName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11608,6 +12357,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig"; + }; + return EncryptionConfig; })(); @@ -11725,15 +12489,18 @@ 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 3: - message.recurrence = reader.string(); - 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; + } + case 3: { + message.recurrence = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11850,6 +12617,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MaintenanceWindow + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow"; + }; + return MaintenanceWindow; })(); @@ -11967,15 +12749,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.decode(reader, reader.uint32()); - break; - case 2: - message.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.decode(reader, reader.uint32()); - break; - case 3: - message.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.decode(reader, reader.uint32()); - break; + case 1: { + message.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12097,6 +12882,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WorkloadsConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig"; + }; + WorkloadsConfig.SchedulerResource = (function() { /** @@ -12222,18 +13022,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cpu = reader.float(); - break; - case 2: - message.memoryGb = reader.float(); - break; - case 3: - message.storageGb = reader.float(); - break; - case 4: - message.count = reader.int32(); - break; + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + case 4: { + message.count = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12348,6 +13152,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SchedulerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchedulerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource"; + }; + return SchedulerResource; })(); @@ -12465,15 +13284,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cpu = reader.float(); - break; - case 2: - message.memoryGb = reader.float(); - break; - case 3: - message.storageGb = reader.float(); - break; + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -12580,6 +13402,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebServerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource"; + }; + return WebServerResource; })(); @@ -12719,21 +13556,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cpu = reader.float(); - break; - case 2: - message.memoryGb = reader.float(); - break; - case 3: - message.storageGb = reader.float(); - break; - case 4: - message.minCount = reader.int32(); - break; - case 5: - message.maxCount = reader.int32(); - break; + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + case 4: { + message.minCount = reader.int32(); + break; + } + case 5: { + message.maxCount = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12856,6 +13698,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WorkerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource"; + }; + return WorkerResource; })(); @@ -13022,46 +13879,53 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.decode(reader, reader.uint32()); - break; - case 3: - message.uuid = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.uuid = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -13263,6 +14127,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Environment + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.Environment"; + }; + /** * State enum. * @name google.cloud.orchestration.airflow.service.v1beta1.Environment.State @@ -13391,12 +14270,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.environment = reader.string(); - break; - case 2: - message.imageVersion = reader.string(); - break; + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.imageVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13495,6 +14376,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CheckUpgradeRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest"; + }; + return CheckUpgradeRequest; })(); @@ -13636,40 +14532,45 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.buildLogUri = reader.string(); - break; - case 4: - message.containsPypiModulesConflict = reader.int32(); - break; - case 3: - message.pypiConflictBuildLogExtract = reader.string(); - break; - case 5: - message.imageVersion = reader.string(); - break; - case 6: - if (message.pypiDependencies === $util.emptyObject) - message.pypiDependencies = {}; - 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.buildLogUri = reader.string(); + break; + } + case 4: { + message.containsPypiModulesConflict = reader.int32(); + break; + } + case 3: { + message.pypiConflictBuildLogExtract = reader.string(); + break; + } + case 5: { + message.imageVersion = reader.string(); + break; + } + case 6: { + if (message.pypiDependencies === $util.emptyObject) + message.pypiDependencies = {}; + 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.pypiDependencies[key] = value; + break; } - message.pypiDependencies[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -13825,6 +14726,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CheckUpgradeResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckUpgradeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse"; + }; + /** * ConflictResult enum. * @name google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult @@ -13877,7 +14793,7 @@ }; /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions#listImageVersions}. + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions|listImageVersions}. * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions * @typedef ListImageVersionsCallback * @type {function} @@ -14037,18 +14953,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.includePastReleases = reader.bool(); - 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.includePastReleases = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -14163,6 +15083,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListImageVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListImageVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest"; + }; + return ListImageVersionsRequest; })(); @@ -14271,14 +15206,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.imageVersions && message.imageVersions.length)) - message.imageVersions = []; - message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.imageVersions && message.imageVersions.length)) + message.imageVersions = []; + message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14394,6 +15331,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListImageVersionsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListImageVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse"; + }; + return ListImageVersionsResponse; })(); @@ -14546,26 +15498,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.imageVersionId = reader.string(); - break; - case 2: - message.isDefault = reader.bool(); - break; - case 3: - if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) - message.supportedPythonVersions = []; - message.supportedPythonVersions.push(reader.string()); - break; - case 4: - message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - case 5: - message.creationDisabled = reader.bool(); - break; - case 6: - message.upgradeDisabled = reader.bool(); - break; + case 1: { + message.imageVersionId = reader.string(); + break; + } + case 2: { + message.isDefault = reader.bool(); + break; + } + case 3: { + if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) + message.supportedPythonVersions = []; + message.supportedPythonVersions.push(reader.string()); + break; + } + case 4: { + message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.creationDisabled = reader.bool(); + break; + } + case 6: { + message.upgradeDisabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -14714,6 +15672,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ImageVersion + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ImageVersion"; + }; + return ImageVersion; })(); @@ -14864,24 +15837,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.operationType = reader.int32(); - break; - case 3: - message.resource = reader.string(); - break; - case 4: - message.resourceUuid = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.operationType = reader.int32(); + break; + } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.resourceUuid = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15078,6 +16057,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata"; + }; + /** * State enum. * @name google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State @@ -15250,14 +16244,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; @@ -15373,6 +16369,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; })(); @@ -15583,38 +16594,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; @@ -15836,6 +16857,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; })(); @@ -15942,12 +16978,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; @@ -16046,6 +17084,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; })(); @@ -16240,36 +17293,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; @@ -16467,6 +17527,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 @@ -16603,12 +17678,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; @@ -16707,6 +17784,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; })(); @@ -16816,11 +17908,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; @@ -16927,13 +18020,28 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorSet; - })(); - - protobuf.FileDescriptorProto = (function() { - /** - * Properties of a FileDescriptorProto. + * 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 @@ -16948,6 +18056,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 */ /** @@ -17068,6 +18177,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 @@ -17123,6 +18240,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; }; @@ -17157,66 +18276,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; @@ -17328,6 +18463,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; }; @@ -17420,6 +18558,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -17451,6 +18591,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -17497,6 +18638,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; }; @@ -17511,6 +18654,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; })(); @@ -17721,52 +18879,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; @@ -18067,6 +19235,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() { /** @@ -18181,15 +19364,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; @@ -18301,6 +19487,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; })(); @@ -18407,12 +19608,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; @@ -18511,6 +19714,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; })(); @@ -18611,11 +19829,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; @@ -18722,6 +19941,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; })(); @@ -18927,39 +20161,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; @@ -19246,6 +20491,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 @@ -19414,12 +20674,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; @@ -19523,6 +20785,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; })(); @@ -19668,27 +20945,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; @@ -19864,6 +21146,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() { /** @@ -19967,12 +21264,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; @@ -20071,6 +21370,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; })(); @@ -20191,15 +21505,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; @@ -20311,6 +21628,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; })(); @@ -20430,17 +21762,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; @@ -20570,6 +21905,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; })(); @@ -20720,24 +22070,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; @@ -20873,6 +22229,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; })(); @@ -21203,76 +22574,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; @@ -21585,6 +22978,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 @@ -21753,26 +23161,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; @@ -21926,6 +23340,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; })(); @@ -21939,6 +23368,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 @@ -21995,6 +23425,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -22071,6 +23509,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(); @@ -22116,42 +23556,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; @@ -22211,6 +23664,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"; @@ -22296,6 +23752,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) @@ -22383,6 +23841,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")) @@ -22397,6 +23856,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) @@ -22423,6 +23884,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 @@ -22552,11 +24028,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; @@ -22663,6 +24140,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; })(); @@ -22782,17 +24274,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; @@ -22917,6 +24412,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; })(); @@ -23025,14 +24535,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; @@ -23148,6 +24660,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; })(); @@ -23278,20 +24805,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; @@ -23424,6 +24955,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; })(); @@ -23578,28 +25124,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23789,6 +25341,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 @@ -23968,29 +25535,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; @@ -24103,7 +25677,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); @@ -24184,6 +25758,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() { /** @@ -24285,12 +25874,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; @@ -24391,6 +25982,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; })(); @@ -24491,11 +26097,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; @@ -24602,6 +26209,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() { /** @@ -24750,37 +26372,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; @@ -24941,6 +26568,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; })(); @@ -25041,11 +26683,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; @@ -25152,6 +26795,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() { /** @@ -25162,6 +26820,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 */ /** @@ -25212,6 +26871,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 @@ -25248,6 +26915,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; }; @@ -25282,25 +26951,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; @@ -25352,6 +27029,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; }; @@ -25380,6 +27066,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; }; @@ -25402,6 +27102,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -25414,6 +27115,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; }; @@ -25428,6 +27131,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; })(); @@ -25537,12 +27271,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -25604,7 +27340,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -25650,6 +27386,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); @@ -25756,12 +27507,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; @@ -25874,6 +27627,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -26034,6 +27802,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; })(); @@ -26131,11 +27914,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; @@ -26237,6 +28021,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; })(); @@ -26343,12 +28142,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; @@ -26461,6 +28262,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; })(); @@ -26509,7 +28325,7 @@ }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @memberof google.longrunning.Operations * @typedef ListOperationsCallback * @type {function} @@ -26542,7 +28358,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @memberof google.longrunning.Operations * @typedef GetOperationCallback * @type {function} @@ -26575,7 +28391,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @memberof google.longrunning.Operations * @typedef DeleteOperationCallback * @type {function} @@ -26608,7 +28424,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @memberof google.longrunning.Operations * @typedef CancelOperationCallback * @type {function} @@ -26641,7 +28457,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @memberof google.longrunning.Operations * @typedef WaitOperationCallback * @type {function} @@ -26826,21 +28642,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -26991,6 +28812,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -27086,9 +28922,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; @@ -27178,6 +29015,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -27306,18 +29158,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27432,6 +29288,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -27540,14 +29411,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27663,6 +29536,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -27758,9 +29646,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; @@ -27850,6 +29739,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -27945,9 +29849,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; @@ -28037,6 +29942,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -28143,12 +30063,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -28252,6 +30174,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -28358,12 +30295,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28462,6 +30401,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); @@ -28593,17 +30547,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -28728,6 +30685,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + return Status; })(); @@ -28857,15 +30829,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.year = reader.int32(); - break; - case 2: - message.month = reader.int32(); - break; - case 3: - message.day = reader.int32(); - break; + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -28972,6 +30947,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + return Date; })(); diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.json b/packages/google-cloud-orchestration-airflow-service/protos/protos.json index aacddc38005..ec581aea00f 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.json +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.json @@ -2118,6 +2118,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -2646,6 +2650,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -2938,6 +2949,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 04a4cf9f5573ef0ef0ad25296a758ca6322d205a 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:29 +0000 Subject: [PATCH 36/48] fix: do not import the whole google-gax from proto JS (#1553) (#67) 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 --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- .../protos/protos.d.ts | 2 +- .../google-cloud-orchestration-airflow-service/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 5eabdd66007..2c1cb409394 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index b6a079bbb41..fb0192e0be1 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/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-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index 24fb2e5d2c2..f4a5b036292 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/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 e8ebfca6125d23c256ae51c065a7d1b40366989b 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:44:13 +0000 Subject: [PATCH 37/48] fix: allow passing gax instance to client constructor (#68) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1/environments_client.ts | 68 ++++++++------ .../src/v1/image_versions_client.ts | 33 ++++--- .../src/v1beta1/environments_client.ts | 90 +++++++++++-------- .../src/v1beta1/image_versions_client.ts | 33 ++++--- 4 files changed, 142 insertions(+), 82 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index 0c1dba7facc..05e202c5ef1 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './environments_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -99,8 +97,18 @@ export class EnvironmentsClient { * 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 EnvironmentsClient({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 EnvironmentsClient; const servicePath = @@ -120,8 +128,13 @@ export class EnvironmentsClient { 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); @@ -260,7 +273,7 @@ export class EnvironmentsClient { 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; } /** @@ -480,7 +493,7 @@ export class EnvironmentsClient { 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 +600,7 @@ export class EnvironmentsClient { 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(); @@ -613,11 +626,12 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createEnvironment, this._gaxModule.createDefaultBackoffSettings() @@ -842,7 +856,7 @@ export class EnvironmentsClient { 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(); @@ -868,11 +882,12 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateEnvironment, this._gaxModule.createDefaultBackoffSettings() @@ -980,7 +995,7 @@ export class EnvironmentsClient { 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(); @@ -1006,11 +1021,12 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteEnvironment, this._gaxModule.createDefaultBackoffSettings() @@ -1113,7 +1129,7 @@ export class EnvironmentsClient { 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(); @@ -1152,7 +1168,7 @@ export class EnvironmentsClient { 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['listEnvironments']; @@ -1200,7 +1216,7 @@ export class EnvironmentsClient { 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['listEnvironments']; diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index 76640bfc740..8b8a6d0cefe 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -36,7 +35,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './image_versions_client_config.json'; - const version = require('../../../package.json').version; /** @@ -96,8 +94,18 @@ export class ImageVersionsClient { * 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 ImageVersionsClient({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 ImageVersionsClient; const servicePath = @@ -117,8 +125,13 @@ export class ImageVersionsClient { 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); @@ -192,7 +205,7 @@ export class ImageVersionsClient { 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; } /** @@ -407,7 +420,7 @@ export class ImageVersionsClient { 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(); @@ -448,7 +461,7 @@ export class ImageVersionsClient { 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['listImageVersions']; @@ -498,7 +511,7 @@ export class ImageVersionsClient { 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['listImageVersions']; diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index 88d64c071ce..cba9683922a 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './environments_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -99,8 +97,18 @@ export class EnvironmentsClient { * 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 EnvironmentsClient({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 EnvironmentsClient; const servicePath = @@ -120,8 +128,13 @@ export class EnvironmentsClient { 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); @@ -282,7 +295,7 @@ export class EnvironmentsClient { 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; } /** @@ -504,7 +517,7 @@ export class EnvironmentsClient { 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(); @@ -611,7 +624,7 @@ export class EnvironmentsClient { 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(); @@ -637,11 +650,12 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createEnvironment, this._gaxModule.createDefaultBackoffSettings() @@ -882,7 +896,7 @@ export class EnvironmentsClient { 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(); @@ -908,11 +922,12 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateEnvironment, this._gaxModule.createDefaultBackoffSettings() @@ -1020,7 +1035,7 @@ export class EnvironmentsClient { 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(); @@ -1046,11 +1061,12 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteEnvironment, this._gaxModule.createDefaultBackoffSettings() @@ -1159,7 +1175,7 @@ export class EnvironmentsClient { 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(); @@ -1185,11 +1201,12 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.restartWebServer, this._gaxModule.createDefaultBackoffSettings() @@ -1321,7 +1338,7 @@ export class EnvironmentsClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ environment: request.environment || '', }); this.initialize(); @@ -1347,11 +1364,12 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.checkUpgrade, this._gaxModule.createDefaultBackoffSettings() @@ -1454,7 +1472,7 @@ export class EnvironmentsClient { 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(); @@ -1493,7 +1511,7 @@ export class EnvironmentsClient { 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['listEnvironments']; @@ -1541,7 +1559,7 @@ export class EnvironmentsClient { 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['listEnvironments']; diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index 5773a42aa77..a24a7db9f79 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -36,7 +35,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './image_versions_client_config.json'; - const version = require('../../../package.json').version; /** @@ -96,8 +94,18 @@ export class ImageVersionsClient { * 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 ImageVersionsClient({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 ImageVersionsClient; const servicePath = @@ -117,8 +125,13 @@ export class ImageVersionsClient { 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); @@ -192,7 +205,7 @@ export class ImageVersionsClient { 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; } /** @@ -407,7 +420,7 @@ export class ImageVersionsClient { 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(); @@ -448,7 +461,7 @@ export class ImageVersionsClient { 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['listImageVersions']; @@ -498,7 +511,7 @@ export class ImageVersionsClient { 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['listImageVersions']; From c8fb73906e99899ba3d35a01f2d160be10666205 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 18:04:41 -0400 Subject: [PATCH 38/48] chore(main): release 2.1.1 (#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .../CHANGELOG.md | 11 +++++++++++ .../package.json | 2 +- ...google.cloud.orchestration.airflow.service.v1.json | 2 +- ...e.cloud.orchestration.airflow.service.v1beta1.json | 2 +- .../samples/package.json | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md index 7f965bd0562..7c2373a8e21 100644 --- a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md +++ b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.1.1](https://github.com/googleapis/nodejs-orchestration-airflow/compare/v2.1.0...v2.1.1) (2022-09-01) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#68](https://github.com/googleapis/nodejs-orchestration-airflow/issues/68)) ([f757a98](https://github.com/googleapis/nodejs-orchestration-airflow/commit/f757a988851df8a5ebb47c77625a4a2ced3e5e02)) +* Better support for fallback mode ([#63](https://github.com/googleapis/nodejs-orchestration-airflow/issues/63)) ([51899a8](https://github.com/googleapis/nodejs-orchestration-airflow/commit/51899a81a2556081ab6b6c7f3b2ab141e16a636a)) +* Change import long to require ([#64](https://github.com/googleapis/nodejs-orchestration-airflow/issues/64)) ([b7a1b79](https://github.com/googleapis/nodejs-orchestration-airflow/commit/b7a1b794912552bd33fe7cd341eec6a48ce11676)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-orchestration-airflow/issues/1553)) ([#67](https://github.com/googleapis/nodejs-orchestration-airflow/issues/67)) ([b51775f](https://github.com/googleapis/nodejs-orchestration-airflow/commit/b51775fdbf36544855469c0b5773611826f4a197)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-orchestration-airflow/issues/1546)) ([#66](https://github.com/googleapis/nodejs-orchestration-airflow/issues/66)) ([a2c7e4c](https://github.com/googleapis/nodejs-orchestration-airflow/commit/a2c7e4c221aaed03b13d83e50ff4e94de56bd876)) + ## [2.1.0](https://github.com/googleapis/nodejs-orchestration-airflow/compare/v2.0.0...v2.1.0) (2022-06-30) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 2c1cb409394..71b0e3687e1 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/orchestration-airflow", - "version": "2.1.0", + "version": "2.1.1", "description": "orchestration-airflow client for Node.js", "repository": "googleapis/nodejs-orchestration-airflow", "license": "Apache-2.0", diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json index 0ca4e93055a..5de3a995c96 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "2.1.0", + "version": "2.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json index bace47d4f05..c6f6b949747 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "2.1.0", + "version": "2.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json index f5fcfad2cf2..14087c45147 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/package.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/orchestration-airflow": "^2.1.0" + "@google-cloud/orchestration-airflow": "^2.1.1" }, "devDependencies": { "c8": "^7.1.0", From 63c73c829428d6bcfd99911cbf74a89c414e0bc1 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:38:23 +0000 Subject: [PATCH 39/48] fix: preserve default values in x-goog-request-params header (#69) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v1/environments_client.ts | 14 +- .../src/v1/image_versions_client.ts | 6 +- .../src/v1beta1/environments_client.ts | 18 +- .../src/v1beta1/image_versions_client.ts | 6 +- .../test/gapic_environments_v1.ts | 578 ++++++------- .../test/gapic_environments_v1beta1.ts | 794 +++++++++--------- .../test/gapic_image_versions_v1.ts | 168 ++-- .../test/gapic_image_versions_v1beta1.ts | 168 ++-- 8 files changed, 916 insertions(+), 836 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index 05e202c5ef1..a313b7750f2 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -494,7 +494,7 @@ export class EnvironmentsClient { 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.getEnvironment(request, options, callback); @@ -601,7 +601,7 @@ export class EnvironmentsClient { 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.createEnvironment(request, options, callback); @@ -857,7 +857,7 @@ export class EnvironmentsClient { 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.updateEnvironment(request, options, callback); @@ -996,7 +996,7 @@ export class EnvironmentsClient { 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.deleteEnvironment(request, options, callback); @@ -1130,7 +1130,7 @@ export class EnvironmentsClient { 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.listEnvironments(request, options, callback); @@ -1169,7 +1169,7 @@ export class EnvironmentsClient { 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['listEnvironments']; const callSettings = defaultCallSettings.merge(options); @@ -1217,7 +1217,7 @@ export class EnvironmentsClient { 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['listEnvironments']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index 8b8a6d0cefe..0a89fabb982 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -421,7 +421,7 @@ export class ImageVersionsClient { 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.listImageVersions(request, options, callback); @@ -462,7 +462,7 @@ export class ImageVersionsClient { 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['listImageVersions']; const callSettings = defaultCallSettings.merge(options); @@ -512,7 +512,7 @@ export class ImageVersionsClient { 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['listImageVersions']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index cba9683922a..cd7145f9bb8 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -518,7 +518,7 @@ export class EnvironmentsClient { 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.getEnvironment(request, options, callback); @@ -625,7 +625,7 @@ export class EnvironmentsClient { 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.createEnvironment(request, options, callback); @@ -897,7 +897,7 @@ export class EnvironmentsClient { 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.updateEnvironment(request, options, callback); @@ -1036,7 +1036,7 @@ export class EnvironmentsClient { 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.deleteEnvironment(request, options, callback); @@ -1176,7 +1176,7 @@ export class EnvironmentsClient { 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.restartWebServer(request, options, callback); @@ -1339,7 +1339,7 @@ export class EnvironmentsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - environment: request.environment || '', + environment: request.environment ?? '', }); this.initialize(); return this.innerApiCalls.checkUpgrade(request, options, callback); @@ -1473,7 +1473,7 @@ export class EnvironmentsClient { 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.listEnvironments(request, options, callback); @@ -1512,7 +1512,7 @@ export class EnvironmentsClient { 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['listEnvironments']; const callSettings = defaultCallSettings.merge(options); @@ -1560,7 +1560,7 @@ export class EnvironmentsClient { 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['listEnvironments']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index a24a7db9f79..9c5e016030e 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -421,7 +421,7 @@ export class ImageVersionsClient { 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.listImageVersions(request, options, callback); @@ -462,7 +462,7 @@ export class ImageVersionsClient { 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['listImageVersions']; const callSettings = defaultCallSettings.merge(options); @@ -512,7 +512,7 @@ export class ImageVersionsClient { 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['listImageVersions']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts index 9ecbce2246f..1d47920c7a1 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -252,26 +267,25 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.Environment() ); client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); const [response] = await client.getEnvironment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment without error using callback', async () => { @@ -283,15 +297,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.Environment() ); @@ -314,11 +324,14 @@ describe('v1.EnvironmentsClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment with error', async () => { @@ -330,26 +343,25 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getEnvironment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getEnvironment(request), expectedError); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment with closed client', async () => { @@ -361,7 +373,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getEnvironment(request), expectedError); @@ -378,15 +393,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -395,11 +406,14 @@ describe('v1.EnvironmentsClient', () => { const [operation] = await client.createEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment without error using callback', async () => { @@ -411,15 +425,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -449,11 +459,14 @@ describe('v1.EnvironmentsClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment with call error', async () => { @@ -465,26 +478,25 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createEnvironment(request), expectedError); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment with LRO error', async () => { @@ -496,15 +508,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createEnvironment = stubLongRunningCall( undefined, @@ -513,11 +521,14 @@ describe('v1.EnvironmentsClient', () => { ); const [operation] = await client.createEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateEnvironmentProgress without error', async () => { @@ -572,15 +583,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -589,11 +596,14 @@ describe('v1.EnvironmentsClient', () => { const [operation] = await client.updateEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment without error using callback', async () => { @@ -605,15 +615,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -643,11 +649,14 @@ describe('v1.EnvironmentsClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment with call error', async () => { @@ -659,26 +668,25 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateEnvironment(request), expectedError); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment with LRO error', async () => { @@ -690,15 +698,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateEnvironment = stubLongRunningCall( undefined, @@ -707,11 +711,14 @@ describe('v1.EnvironmentsClient', () => { ); const [operation] = await client.updateEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateEnvironmentProgress without error', async () => { @@ -766,15 +773,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -783,11 +786,14 @@ describe('v1.EnvironmentsClient', () => { const [operation] = await client.deleteEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment without error using callback', async () => { @@ -799,15 +805,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -837,11 +839,14 @@ describe('v1.EnvironmentsClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment with call error', async () => { @@ -853,26 +858,25 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteEnvironment(request), expectedError); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment with LRO error', async () => { @@ -884,15 +888,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteEnvironment = stubLongRunningCall( undefined, @@ -901,11 +901,14 @@ describe('v1.EnvironmentsClient', () => { ); const [operation] = await client.deleteEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteEnvironmentProgress without error', async () => { @@ -960,15 +963,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.Environment() @@ -983,11 +982,14 @@ describe('v1.EnvironmentsClient', () => { client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); const [response] = await client.listEnvironments(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironments without error using callback', async () => { @@ -999,15 +1001,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.Environment() @@ -1040,11 +1038,14 @@ describe('v1.EnvironmentsClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironments with error', async () => { @@ -1056,26 +1057,25 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listEnvironments = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listEnvironments(request), expectedError); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironmentsStream without error', async () => { @@ -1087,8 +1087,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.Environment() @@ -1128,11 +1131,12 @@ describe('v1.EnvironmentsClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listEnvironments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1145,8 +1149,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1175,11 +1182,12 @@ describe('v1.EnvironmentsClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listEnvironments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1192,8 +1200,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.Environment() @@ -1220,11 +1231,12 @@ describe('v1.EnvironmentsClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1237,8 +1249,11 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1256,11 +1271,12 @@ describe('v1.EnvironmentsClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts index f84ac6de24b..30178cb97a8 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -254,26 +269,25 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() ); client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); const [response] = await client.getEnvironment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment without error using callback', async () => { @@ -285,15 +299,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() ); @@ -316,11 +326,14 @@ describe('v1beta1.EnvironmentsClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment with error', async () => { @@ -332,26 +345,25 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getEnvironment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getEnvironment(request), expectedError); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment with closed client', async () => { @@ -363,7 +375,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getEnvironment(request), expectedError); @@ -380,15 +395,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -397,11 +408,14 @@ describe('v1beta1.EnvironmentsClient', () => { const [operation] = await client.createEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment without error using callback', async () => { @@ -413,15 +427,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -451,11 +461,14 @@ describe('v1beta1.EnvironmentsClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment with call error', async () => { @@ -467,26 +480,25 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createEnvironment(request), expectedError); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment with LRO error', async () => { @@ -498,15 +510,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createEnvironment = stubLongRunningCall( undefined, @@ -515,11 +523,14 @@ describe('v1beta1.EnvironmentsClient', () => { ); const [operation] = await client.createEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateEnvironmentProgress without error', async () => { @@ -574,15 +585,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -591,11 +598,14 @@ describe('v1beta1.EnvironmentsClient', () => { const [operation] = await client.updateEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment without error using callback', async () => { @@ -607,15 +617,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -645,11 +651,14 @@ describe('v1beta1.EnvironmentsClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment with call error', async () => { @@ -661,26 +670,25 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateEnvironment(request), expectedError); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment with LRO error', async () => { @@ -692,15 +700,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateEnvironment = stubLongRunningCall( undefined, @@ -709,11 +713,14 @@ describe('v1beta1.EnvironmentsClient', () => { ); const [operation] = await client.updateEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateEnvironmentProgress without error', async () => { @@ -768,15 +775,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -785,11 +788,14 @@ describe('v1beta1.EnvironmentsClient', () => { const [operation] = await client.deleteEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment without error using callback', async () => { @@ -801,15 +807,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -839,11 +841,14 @@ describe('v1beta1.EnvironmentsClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment with call error', async () => { @@ -855,26 +860,25 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteEnvironment(request), expectedError); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment with LRO error', async () => { @@ -886,15 +890,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteEnvironment = stubLongRunningCall( undefined, @@ -903,11 +903,14 @@ describe('v1beta1.EnvironmentsClient', () => { ); const [operation] = await client.deleteEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteEnvironmentProgress without error', async () => { @@ -962,15 +965,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RestartWebServerRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -979,11 +978,14 @@ describe('v1beta1.EnvironmentsClient', () => { const [operation] = await client.restartWebServer(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.restartWebServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restartWebServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes restartWebServer without error using callback', async () => { @@ -995,15 +997,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RestartWebServerRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1033,11 +1031,14 @@ describe('v1beta1.EnvironmentsClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.restartWebServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restartWebServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes restartWebServer with call error', async () => { @@ -1049,26 +1050,25 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RestartWebServerRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.restartWebServer = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.restartWebServer(request), expectedError); - assert( - (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.restartWebServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restartWebServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes restartWebServer with LRO error', async () => { @@ -1080,15 +1080,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RestartWebServerRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.restartWebServer = stubLongRunningCall( undefined, @@ -1097,11 +1093,14 @@ describe('v1beta1.EnvironmentsClient', () => { ); const [operation] = await client.restartWebServer(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.restartWebServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restartWebServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkRestartWebServerProgress without error', async () => { @@ -1156,15 +1155,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CheckUpgradeRequest', [ + 'environment', + ]); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1172,11 +1167,14 @@ describe('v1beta1.EnvironmentsClient', () => { const [operation] = await client.checkUpgrade(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.checkUpgrade as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkUpgrade as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpgrade without error using callback', async () => { @@ -1188,15 +1186,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CheckUpgradeRequest', [ + 'environment', + ]); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1226,11 +1220,14 @@ describe('v1beta1.EnvironmentsClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.checkUpgrade as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkUpgrade as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpgrade with call error', async () => { @@ -1242,26 +1239,25 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CheckUpgradeRequest', [ + 'environment', + ]); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.checkUpgrade = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.checkUpgrade(request), expectedError); - assert( - (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.checkUpgrade as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkUpgrade as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpgrade with LRO error', async () => { @@ -1273,15 +1269,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CheckUpgradeRequest', [ + 'environment', + ]); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.checkUpgrade = stubLongRunningCall( undefined, @@ -1290,11 +1282,14 @@ describe('v1beta1.EnvironmentsClient', () => { ); const [operation] = await client.checkUpgrade(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.checkUpgrade as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.checkUpgrade as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCheckUpgradeProgress without error', async () => { @@ -1346,15 +1341,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() @@ -1369,11 +1360,14 @@ describe('v1beta1.EnvironmentsClient', () => { client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); const [response] = await client.listEnvironments(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironments without error using callback', async () => { @@ -1385,15 +1379,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() @@ -1426,11 +1416,14 @@ describe('v1beta1.EnvironmentsClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironments with error', async () => { @@ -1442,26 +1435,25 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listEnvironments = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listEnvironments(request), expectedError); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironmentsStream without error', async () => { @@ -1473,8 +1465,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() @@ -1514,11 +1509,12 @@ describe('v1beta1.EnvironmentsClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listEnvironments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1531,8 +1527,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1561,11 +1560,12 @@ describe('v1beta1.EnvironmentsClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listEnvironments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1578,8 +1578,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() @@ -1606,11 +1609,12 @@ describe('v1beta1.EnvironmentsClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1623,8 +1627,11 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1642,11 +1649,12 @@ describe('v1beta1.EnvironmentsClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts index 757dfd84c18..d8303cc3318 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -222,15 +237,11 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() @@ -245,11 +256,14 @@ describe('v1.ImageVersionsClient', () => { client.innerApiCalls.listImageVersions = stubSimpleCall(expectedResponse); const [response] = await client.listImageVersions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listImageVersions without error using callback', async () => { @@ -261,15 +275,11 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() @@ -302,11 +312,14 @@ describe('v1.ImageVersionsClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listImageVersions with error', async () => { @@ -318,26 +331,25 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listImageVersions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listImageVersions(request), expectedError); - assert( - (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listImageVersionsStream without error', async () => { @@ -349,8 +361,11 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() @@ -390,11 +405,12 @@ describe('v1.ImageVersionsClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listImageVersions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listImageVersions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -407,8 +423,11 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -437,11 +456,12 @@ describe('v1.ImageVersionsClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listImageVersions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listImageVersions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -454,8 +474,11 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion() @@ -482,11 +505,12 @@ describe('v1.ImageVersionsClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listImageVersions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -499,8 +523,11 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -518,11 +545,12 @@ describe('v1.ImageVersionsClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listImageVersions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts index 6117a714eac..39e5f7fea4d 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -222,15 +237,11 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() @@ -245,11 +256,14 @@ describe('v1beta1.ImageVersionsClient', () => { client.innerApiCalls.listImageVersions = stubSimpleCall(expectedResponse); const [response] = await client.listImageVersions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listImageVersions without error using callback', async () => { @@ -261,15 +275,11 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() @@ -302,11 +312,14 @@ describe('v1beta1.ImageVersionsClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listImageVersions with error', async () => { @@ -318,26 +331,25 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listImageVersions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listImageVersions(request), expectedError); - assert( - (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listImageVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listImageVersionsStream without error', async () => { @@ -349,8 +361,11 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() @@ -390,11 +405,12 @@ describe('v1beta1.ImageVersionsClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listImageVersions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listImageVersions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -407,8 +423,11 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -437,11 +456,12 @@ describe('v1beta1.ImageVersionsClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listImageVersions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listImageVersions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -454,8 +474,11 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion() @@ -482,11 +505,12 @@ describe('v1beta1.ImageVersionsClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listImageVersions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -499,8 +523,11 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -518,11 +545,12 @@ describe('v1beta1.ImageVersionsClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listImageVersions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From a2268fe0f711e8166b24661af22d87f557cf5984 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:33:56 -0700 Subject: [PATCH 40/48] test: use fully qualified request type name in tests (#72) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test/gapic_environments_v1.ts | 161 +++++++------ .../test/gapic_environments_v1beta1.ts | 217 ++++++++++-------- .../test/gapic_image_versions_v1.ts | 49 ++-- .../test/gapic_image_versions_v1beta1.ts | 49 ++-- 4 files changed, 272 insertions(+), 204 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts index 1d47920c7a1..ba1a0d529fc 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts @@ -267,9 +267,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -297,9 +298,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -343,9 +345,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -373,9 +376,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -393,9 +397,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -425,9 +430,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -478,9 +484,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -508,9 +515,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -583,9 +591,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -615,9 +624,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -668,9 +678,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -698,9 +709,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -773,9 +785,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -805,9 +818,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -858,9 +872,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -888,9 +903,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -963,9 +979,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1001,9 +1018,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1057,9 +1075,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1087,9 +1106,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1149,9 +1169,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1200,9 +1221,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1249,9 +1271,10 @@ describe('v1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts index 30178cb97a8..a21768ea425 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts @@ -269,9 +269,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -299,9 +300,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -345,9 +347,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -375,9 +378,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -395,9 +399,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -427,9 +432,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -480,9 +486,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -510,9 +517,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateEnvironmentRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -585,9 +593,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -617,9 +626,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -670,9 +680,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -700,9 +711,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -775,9 +787,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -807,9 +820,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -860,9 +874,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -890,9 +905,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteEnvironmentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -965,9 +981,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); - const defaultValue1 = getTypeDefaultValue('RestartWebServerRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -997,9 +1014,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); - const defaultValue1 = getTypeDefaultValue('RestartWebServerRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1050,9 +1068,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); - const defaultValue1 = getTypeDefaultValue('RestartWebServerRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1080,9 +1099,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); - const defaultValue1 = getTypeDefaultValue('RestartWebServerRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1155,9 +1175,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); - const defaultValue1 = getTypeDefaultValue('CheckUpgradeRequest', [ - 'environment', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', + ['environment'] + ); request.environment = defaultValue1; const expectedHeaderRequestParams = `environment=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1186,9 +1207,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); - const defaultValue1 = getTypeDefaultValue('CheckUpgradeRequest', [ - 'environment', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', + ['environment'] + ); request.environment = defaultValue1; const expectedHeaderRequestParams = `environment=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1239,9 +1261,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); - const defaultValue1 = getTypeDefaultValue('CheckUpgradeRequest', [ - 'environment', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', + ['environment'] + ); request.environment = defaultValue1; const expectedHeaderRequestParams = `environment=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1269,9 +1292,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); - const defaultValue1 = getTypeDefaultValue('CheckUpgradeRequest', [ - 'environment', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', + ['environment'] + ); request.environment = defaultValue1; const expectedHeaderRequestParams = `environment=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1341,9 +1365,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1379,9 +1404,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1435,9 +1461,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1465,9 +1492,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1527,9 +1555,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1578,9 +1607,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1627,9 +1657,10 @@ describe('v1beta1.EnvironmentsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListEnvironmentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts index d8303cc3318..9b7b9781165 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts @@ -237,9 +237,10 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -275,9 +276,10 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -331,9 +333,10 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -361,9 +364,10 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -423,9 +427,10 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -474,9 +479,10 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -523,9 +529,10 @@ describe('v1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts index 39e5f7fea4d..586ba7c9dfa 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts @@ -237,9 +237,10 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -275,9 +276,10 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -331,9 +333,10 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -361,9 +364,10 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -423,9 +427,10 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -474,9 +479,10 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -523,9 +529,10 @@ describe('v1beta1.ImageVersionsClient', () => { const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListImageVersionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); From 173dbd5a02c73dfe4f2f02f73382ed4a4c90f336 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:41:18 -0700 Subject: [PATCH 41/48] fix(deps): use google-gax v3.5.2 (#76) --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 71b0e3687e1..b05e8d54c75 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/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 69015b0c1fbb67ecc8ffb08e52f1038313dd1c8a Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:20:34 +0100 Subject: [PATCH 42/48] chore(deps): update dependency @types/node to v18 (#74) 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-orchestration-airflow). --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index b05e8d54c75..abe1e7cb543 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/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 ce47ee43f5fb4dc1fbbe7681bc7c82877bcecd5d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 02:44:13 +0000 Subject: [PATCH 43/48] fix: regenerated protos JS and TS definitions (#79) 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 --- .../protos/protos.d.ts | 2 +- .../protos/protos.js | 148 +++++++++++++++--- 2 files changed, 130 insertions(+), 20 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index fb0192e0be1..bdac2dc56e8 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/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-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index f4a5b036292..b53b67125be 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -5237,6 +5237,12 @@ if (object.uuid != null) message.uuid = String(object.uuid); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -5312,7 +5318,7 @@ if (message.uuid != null && message.hasOwnProperty("uuid")) object.uuid = message.uuid; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.Environment.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.Environment.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1.Environment.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) @@ -5633,6 +5639,12 @@ if (object.buildLogUri != null) message.buildLogUri = String(object.buildLogUri); switch (object.containsPypiModulesConflict) { + default: + if (typeof object.containsPypiModulesConflict === "number") { + message.containsPypiModulesConflict = object.containsPypiModulesConflict; + break; + } + break; case "CONFLICT_RESULT_UNSPECIFIED": case 0: message.containsPypiModulesConflict = 0; @@ -5686,7 +5698,7 @@ if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) object.pypiConflictBuildLogExtract = message.pypiConflictBuildLogExtract; if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) - object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; + object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] === undefined ? message.containsPypiModulesConflict : $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) object.imageVersion = message.imageVersion; var keys2; @@ -6934,6 +6946,12 @@ return object; var message = new $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -6960,6 +6978,12 @@ break; } switch (object.operationType) { + default: + if (typeof object.operationType === "number") { + message.operationType = object.operationType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.operationType = 0; @@ -7020,9 +7044,9 @@ object.endTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State[message.state] : message.state; if (message.operationType != null && message.hasOwnProperty("operationType")) - object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type[message.operationType] : message.operationType; + object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type[message.operationType] === undefined ? message.operationType : $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type[message.operationType] : message.operationType; if (message.resource != null && message.hasOwnProperty("resource")) object.resource = message.resource; if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) @@ -9444,6 +9468,12 @@ message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.fromObject(object.workloadsConfig); } switch (object.environmentSize) { + default: + if (typeof object.environmentSize === "number") { + message.environmentSize = object.environmentSize; + break; + } + break; case "ENVIRONMENT_SIZE_UNSPECIFIED": case 0: message.environmentSize = 0; @@ -9520,7 +9550,7 @@ if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) object.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.toObject(message.workloadsConfig, options); if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) - object.environmentSize = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize[message.environmentSize] : message.environmentSize; + object.environmentSize = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize[message.environmentSize] === undefined ? message.environmentSize : $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize[message.environmentSize] : message.environmentSize; return object; }; @@ -14027,6 +14057,12 @@ if (object.uuid != null) message.uuid = String(object.uuid); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -14102,7 +14138,7 @@ if (message.uuid != null && message.hasOwnProperty("uuid")) object.uuid = message.uuid; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) @@ -14650,6 +14686,12 @@ if (object.buildLogUri != null) message.buildLogUri = String(object.buildLogUri); switch (object.containsPypiModulesConflict) { + default: + if (typeof object.containsPypiModulesConflict === "number") { + message.containsPypiModulesConflict = object.containsPypiModulesConflict; + break; + } + break; case "CONFLICT_RESULT_UNSPECIFIED": case 0: message.containsPypiModulesConflict = 0; @@ -14703,7 +14745,7 @@ if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) object.pypiConflictBuildLogExtract = message.pypiConflictBuildLogExtract; if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) - object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; + object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] === undefined ? message.containsPypiModulesConflict : $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) object.imageVersion = message.imageVersion; var keys2; @@ -15950,6 +15992,12 @@ return object; var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -15972,6 +16020,12 @@ break; } switch (object.operationType) { + default: + if (typeof object.operationType === "number") { + message.operationType = object.operationType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.operationType = 0; @@ -16032,9 +16086,9 @@ object.endTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State[message.state] : message.state; if (message.operationType != null && message.hasOwnProperty("operationType")) - object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type[message.operationType] : message.operationType; + object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type[message.operationType] === undefined ? message.operationType : $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type[message.operationType] : message.operationType; if (message.resource != null && message.hasOwnProperty("resource")) object.resource = message.resource; if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) @@ -17432,6 +17486,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; @@ -17456,6 +17516,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; @@ -17503,7 +17567,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")) @@ -17511,7 +17575,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; }; @@ -20322,6 +20386,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; @@ -20336,6 +20406,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; @@ -20462,9 +20538,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")) @@ -22811,6 +22887,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; @@ -22919,7 +23001,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")) @@ -23721,6 +23803,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; @@ -23737,6 +23825,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; @@ -23775,6 +23869,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; @@ -23845,7 +23943,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")) @@ -23853,7 +23951,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")) @@ -23866,7 +23964,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); @@ -25243,6 +25341,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; @@ -25312,7 +25416,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) @@ -27067,6 +27171,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; @@ -27116,7 +27226,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 a31f9c3135b4b34f2f0e00405bc02127b1fa32ce Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 16 Nov 2022 00:52:10 +0100 Subject: [PATCH 44/48] chore(deps): update dependency jsdoc to v4 (#78) Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> --- .../google-cloud-orchestration-airflow-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index abe1e7cb543..33469ebcade 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/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 05fa5dc236cae2e6079c2e722862080c6d9f5353 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 16 Nov 2022 00:00:19 +0000 Subject: [PATCH 45/48] chore(main): release 2.1.2 (#70) :robot: I have created a release *beep* *boop* --- ## [2.1.2](https://togithub.com/googleapis/nodejs-orchestration-airflow/compare/v2.1.1...v2.1.2) (2022-11-15) ### Bug Fixes * **deps:** Use google-gax v3.5.2 ([#76](https://togithub.com/googleapis/nodejs-orchestration-airflow/issues/76)) ([5d9c78a](https://togithub.com/googleapis/nodejs-orchestration-airflow/commit/5d9c78a81d9ae07244f696ac7a9d211964fd62b2)) * Preserve default values in x-goog-request-params header ([#69](https://togithub.com/googleapis/nodejs-orchestration-airflow/issues/69)) ([cdef154](https://togithub.com/googleapis/nodejs-orchestration-airflow/commit/cdef154d8a51c446cdc16b61660f18e6123b8168)) * Regenerated protos JS and TS definitions ([#79](https://togithub.com/googleapis/nodejs-orchestration-airflow/issues/79)) ([b0ef563](https://togithub.com/googleapis/nodejs-orchestration-airflow/commit/b0ef56303b2e61a7a1a8fb505916682631e8beec)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- .../CHANGELOG.md | 9 +++++++++ .../package.json | 2 +- ...ta.google.cloud.orchestration.airflow.service.v1.json | 2 +- ...ogle.cloud.orchestration.airflow.service.v1beta1.json | 2 +- .../samples/package.json | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md index 7c2373a8e21..afcfbf7aa46 100644 --- a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md +++ b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [2.1.2](https://github.com/googleapis/nodejs-orchestration-airflow/compare/v2.1.1...v2.1.2) (2022-11-15) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#76](https://github.com/googleapis/nodejs-orchestration-airflow/issues/76)) ([5d9c78a](https://github.com/googleapis/nodejs-orchestration-airflow/commit/5d9c78a81d9ae07244f696ac7a9d211964fd62b2)) +* Preserve default values in x-goog-request-params header ([#69](https://github.com/googleapis/nodejs-orchestration-airflow/issues/69)) ([cdef154](https://github.com/googleapis/nodejs-orchestration-airflow/commit/cdef154d8a51c446cdc16b61660f18e6123b8168)) +* Regenerated protos JS and TS definitions ([#79](https://github.com/googleapis/nodejs-orchestration-airflow/issues/79)) ([b0ef563](https://github.com/googleapis/nodejs-orchestration-airflow/commit/b0ef56303b2e61a7a1a8fb505916682631e8beec)) + ## [2.1.1](https://github.com/googleapis/nodejs-orchestration-airflow/compare/v2.1.0...v2.1.1) (2022-09-01) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 33469ebcade..f591ee8ec4b 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/orchestration-airflow", - "version": "2.1.1", + "version": "2.1.2", "description": "orchestration-airflow client for Node.js", "repository": "googleapis/nodejs-orchestration-airflow", "license": "Apache-2.0", diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json index 5de3a995c96..c4a4d33339d 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "2.1.1", + "version": "2.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json index c6f6b949747..f25bbddaf9e 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "2.1.1", + "version": "2.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json index 14087c45147..22819f957da 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/package.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/orchestration-airflow": "^2.1.1" + "@google-cloud/orchestration-airflow": "^2.1.2" }, "devDependencies": { "c8": "^7.1.0", From d91b4b20e8bcb7c1ae8ee2dceb9525f56492351f Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Tue, 15 Nov 2022 16:55:05 -0800 Subject: [PATCH 46/48] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 46 +-- .../{.github => }/.OwlBot.yaml | 6 +- .../.mocharc.js | 2 +- .../.prettierrc.js | 2 +- .../.repo-metadata.json | 2 +- .../README.md | 29 +- .../package.json | 13 +- .../samples/README.md | 282 +++++++++++++++++- .../src/index.ts | 2 +- release-please-config.json | 49 +-- 10 files changed, 361 insertions(+), 72 deletions(-) rename packages/google-cloud-orchestration-airflow-service/{.github => }/.OwlBot.yaml (85%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d68c0bd4397..cbe11cf32e0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,16 +1,16 @@ { "packages/gapic-node-templating": "0.0.0", "packages/google-api-apikeys": "0.1.3", - "packages/google-cloud-baremetalsolution": "0.2.2", + "packages/google-api-servicecontrol": "2.0.3", "packages/google-api-servicemanagement": "1.1.3", - "packages/google-cloud-apigateway": "2.1.2", "packages/google-api-serviceusage": "2.1.2", - "packages/google-api-servicecontrol": "2.0.3", "packages/google-appengine": "2.1.2", "packages/google-cloud-accessapproval": "2.1.2", + "packages/google-cloud-apigateway": "2.1.2", "packages/google-cloud-apigeeconnect": "2.1.3", "packages/google-cloud-asset": "4.5.0", "packages/google-cloud-assuredworkloads": "3.5.0", + "packages/google-cloud-baremetalsolution": "0.2.2", "packages/google-cloud-batch": "0.3.2", "packages/google-cloud-beyondcorp-appconnections": "0.2.3", "packages/google-cloud-beyondcorp-appconnectors": "0.3.3", @@ -23,49 +23,50 @@ "packages/google-cloud-bigquery-datatransfer": "3.1.5", "packages/google-cloud-bigquery-reservation": "2.0.4", "packages/google-cloud-bigquery-storage": "3.2.0", - "packages/google-cloud-binaryauthorization": "2.1.1", "packages/google-cloud-billing": "3.1.3", "packages/google-cloud-billing-budgets": "4.1.2", + "packages/google-cloud-binaryauthorization": "2.1.1", "packages/google-cloud-certificatemanager": "0.6.2", + "packages/google-cloud-channel": "2.2.0", "packages/google-cloud-clouddms": "2.1.2", "packages/google-cloud-contactcenterinsights": "2.1.2", - "packages/google-cloud-channel": "2.2.0", "packages/google-cloud-contentwarehouse": "0.1.2", "packages/google-cloud-datafusion": "2.1.2", "packages/google-cloud-datalabeling": "3.1.1", "packages/google-cloud-dataplex": "2.2.2", "packages/google-cloud-dataproc": "4.1.1", - "packages/google-cloud-datastream": "2.1.2", "packages/google-cloud-dataqna": "2.0.2", + "packages/google-cloud-datastream": "2.1.2", "packages/google-cloud-deploy": "2.2.2", - "packages/google-cloud-dialogflow-cx": "3.1.2", "packages/google-cloud-dialogflow": "5.3.0", + "packages/google-cloud-dialogflow-cx": "3.1.2", "packages/google-cloud-discoveryengine": "0.2.0", - "packages/google-cloud-gkebackup": "0.2.2", - "packages/google-cloud-eventarc-publishing": "2.3.0", + "packages/google-cloud-documentai": "6.1.0", + "packages/google-cloud-domains": "2.1.2", "packages/google-cloud-essentialcontacts": "2.0.2", "packages/google-cloud-eventarc": "2.2.0", - "packages/google-cloud-domains": "2.1.2", - "packages/google-cloud-gaming": "3.1.3", + "packages/google-cloud-eventarc-publishing": "2.3.0", "packages/google-cloud-functions": "2.2.3", - "packages/google-cloud-documentai": "6.1.0", + "packages/google-cloud-gaming": "3.1.3", + "packages/google-cloud-gkebackup": "0.2.2", "packages/google-cloud-gkeconnect-gateway": "2.0.5", "packages/google-cloud-gkehub": "3.2.2", "packages/google-cloud-gkemulticloud": "0.1.4", - "packages/google-cloud-ids": "2.1.2", "packages/google-cloud-iap": "2.0.3", + "packages/google-cloud-ids": "2.1.2", "packages/google-cloud-iot": "3.1.2", "packages/google-cloud-language": "5.1.2", - "packages/google-cloud-mediatranslation": "3.0.5", "packages/google-cloud-lifesciences": "2.1.2", + "packages/google-cloud-mediatranslation": "3.0.5", "packages/google-cloud-memcache": "2.1.4", "packages/google-cloud-metastore": "3.1.2", "packages/google-cloud-monitoring": "3.0.3", - "packages/google-cloud-orgpolicy": "2.0.3", - "packages/google-cloud-optimization": "2.1.1", - "packages/google-cloud-networksecurity": "1.0.2", "packages/google-cloud-networkmanagement": "2.3.1", + "packages/google-cloud-networksecurity": "1.0.2", "packages/google-cloud-notebooks": "2.1.2", + "packages/google-cloud-optimization": "2.1.1", + "packages/google-cloud-orchestration-airflow-service": "2.1.2", + "packages/google-cloud-orgpolicy": "2.0.3", "packages/google-cloud-osconfig": "2.1.2", "packages/google-cloud-oslogin": "4.0.4", "packages/google-cloud-phishingprotection": "3.0.6", @@ -75,10 +76,9 @@ "packages/google-cloud-redis": "3.1.5", "packages/google-cloud-resourcemanager": "4.1.3", "packages/google-cloud-resourcesettings": "2.0.3", - "packages/google-cloud-security-privateca": "4.1.2", - "packages/google-cloud-secretmanager": "4.1.4", "packages/google-cloud-scheduler": "3.0.5", "packages/google-cloud-secretmanager": "4.1.4", + "packages/google-cloud-security-privateca": "4.1.2", "packages/google-cloud-security-publicca": "0.1.3", "packages/google-cloud-servicedirectory": "4.0.4", "packages/google-cloud-shell": "2.0.4", @@ -89,19 +89,19 @@ "packages/google-cloud-video-livestream": "0.3.4", "packages/google-cloud-video-transcoder": "2.2.3", "packages/google-cloud-videointelligence": "4.1.1", - "packages/google-cloud-vpcaccess": "2.1.3", "packages/google-cloud-vmmigration": "2.2.1", + "packages/google-cloud-vpcaccess": "2.1.3", + "packages/google-cloud-webrisk": "3.2.0", "packages/google-cloud-websecurityscanner": "2.1.3", "packages/google-cloud-workflows-executions": "2.2.0", - "packages/google-cloud-webrisk": "3.2.0", "packages/google-container": "4.4.0", "packages/google-dataflow": "2.0.1", "packages/google-devtools-artifactregistry": "2.0.2", - "packages/google-devtools-containeranalysis": "4.4.1", "packages/google-devtools-cloudbuild": "3.2.0", + "packages/google-devtools-containeranalysis": "4.4.1", "packages/google-iam": "0.2.2", - "packages/google-identity-accesscontextmanager": "2.2.0", "packages/google-iam-credentials": "2.0.2", + "packages/google-identity-accesscontextmanager": "2.2.0", "packages/google-maps-addressvalidation": "0.1.0", "packages/google-maps-routing": "0.2.1", "packages/google-monitoring-dashboard": "2.8.0", diff --git a/packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml b/packages/google-cloud-orchestration-airflow-service/.OwlBot.yaml similarity index 85% rename from packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml rename to packages/google-cloud-orchestration-airflow-service/.OwlBot.yaml index 2dc9abbb555..4721939d54e 100644 --- a/packages/google-cloud-orchestration-airflow-service/.github/.OwlBot.yaml +++ b/packages/google-cloud-orchestration-airflow-service/.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/orchestration/airflow/service/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/orchestration/airflow/service/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-orchestration-airflow-service/$1 diff --git a/packages/google-cloud-orchestration-airflow-service/.mocharc.js b/packages/google-cloud-orchestration-airflow-service/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-orchestration-airflow-service/.mocharc.js +++ b/packages/google-cloud-orchestration-airflow-service/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/.prettierrc.js b/packages/google-cloud-orchestration-airflow-service/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-orchestration-airflow-service/.prettierrc.js +++ b/packages/google-cloud-orchestration-airflow-service/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json b/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json index 729887de0a6..dd040da59b6 100644 --- a/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json +++ b/packages/google-cloud-orchestration-airflow-service/.repo-metadata.json @@ -9,7 +9,7 @@ "release_level": "stable", "default_version": "v1", "language": "nodejs", - "repo": "googleapis/nodejs-orchestration-airflow", + "repo": "googleapis/google-cloud-node", "requires_billing": true, "issue_tracker": "https://issuetracker.google.com/issues/new?component=460446", "api_shortname": "composer", diff --git a/packages/google-cloud-orchestration-airflow-service/README.md b/packages/google-cloud-orchestration-airflow-service/README.md index 2ddf237857b..3270ec43b77 100644 --- a/packages/google-cloud-orchestration-airflow-service/README.md +++ b/packages/google-cloud-orchestration-airflow-service/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Composer: Node.js Client](https://github.com/googleapis/nodejs-orchestration-airflow) +# [Cloud Composer: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/orchestration-airflow.svg)](https://www.npmjs.org/package/@google-cloud/orchestration-airflow) @@ -14,11 +14,11 @@ orchestration-airflow client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-orchestration-airflow/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md). * [Cloud Composer Node.js Client API Reference][client-docs] * [Cloud Composer Documentation][product-docs] -* [github.com/googleapis/nodejs-orchestration-airflow](https://github.com/googleapis/nodejs-orchestration-airflow) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-orchestration-airflow-service](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-orchestration-airflow-service) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -84,11 +84,26 @@ listImageVersions(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-orchestration-airflow/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-orchestration-airflow/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-orchestration-airflow&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js,samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js,samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js,samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js,samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js,samples/README.md) | +| Image_versions.list_image_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_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=/workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_versions.js,samples/README.md) | +| Environments.check_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js,samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js,samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js,samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js,samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js,samples/README.md) | +| Environments.restart_web_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js,samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js,samples/README.md) | +| Image_versions.list_image_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_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=/workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_versions.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) | @@ -138,7 +153,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-orchestration-airflow/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`) @@ -150,7 +165,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-orchestration-airflow/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/orchestration-airflow/latest [product-docs]: https://cloud.google.com/composer/docs diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index f591ee8ec4b..36faa1b53da 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -2,7 +2,11 @@ "name": "@google-cloud/orchestration-airflow", "version": "2.1.2", "description": "orchestration-airflow client for Node.js", - "repository": "googleapis/nodejs-orchestration-airflow", + "repository": { + "type": "git", + "directory": "packages/google-cloud-orchestration-airflow-service", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", @@ -33,9 +37,9 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test", - "samples-test": "cd samples/ && npm link ../ && npm test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { @@ -62,5 +66,6 @@ }, "engines": { "node": ">=12.0.0" - } + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-orchestration-airflow-service" } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/README.md b/packages/google-cloud-orchestration-airflow-service/samples/README.md index 11d1af30d0d..af14d9dd3a6 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/README.md +++ b/packages/google-cloud-orchestration-airflow-service/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Composer: Node.js Samples](https://github.com/googleapis/nodejs-orchestration-airflow) +# [Cloud Composer: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,27 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Environments.create_environment](#environments.create_environment) + * [Environments.delete_environment](#environments.delete_environment) + * [Environments.get_environment](#environments.get_environment) + * [Environments.list_environments](#environments.list_environments) + * [Environments.update_environment](#environments.update_environment) + * [Image_versions.list_image_versions](#image_versions.list_image_versions) + * [Environments.check_upgrade](#environments.check_upgrade) + * [Environments.create_environment](#environments.create_environment) + * [Environments.delete_environment](#environments.delete_environment) + * [Environments.get_environment](#environments.get_environment) + * [Environments.list_environments](#environments.list_environments) + * [Environments.restart_web_server](#environments.restart_web_server) + * [Environments.update_environment](#environments.update_environment) + * [Image_versions.list_image_versions](#image_versions.list_image_versions) + * [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/nodejs-orchestration-airflow#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +44,271 @@ Before running the samples, make sure you've followed the steps outlined in +### Environments.create_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js` + + +----- + + + + +### Environments.delete_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js` + + +----- + + + + +### Environments.get_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js` + + +----- + + + + +### Environments.list_environments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js` + + +----- + + + + +### Environments.update_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js` + + +----- + + + + +### Image_versions.list_image_versions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_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=/workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_versions.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_versions.js` + + +----- + + + + +### Environments.check_upgrade + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js` + + +----- + + + + +### Environments.create_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js` + + +----- + + + + +### Environments.delete_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js` + + +----- + + + + +### Environments.get_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js` + + +----- + + + + +### Environments.list_environments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js` + + +----- + + + + +### Environments.restart_web_server + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js` + + +----- + + + + +### Environments.update_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js` + + +----- + + + + +### Image_versions.list_image_versions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_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=/workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_versions.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_versions.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/quickstart.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-orchestration-airflow/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-orchestration-airflow&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node /workspace/google-cloud-node/samples/test/quickstart.js` @@ -46,5 +316,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-orchestration-airflow&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/composer/docs diff --git a/packages/google-cloud-orchestration-airflow-service/src/index.ts b/packages/google-cloud-orchestration-airflow-service/src/index.ts index bcd31aca47c..036ff3629d0 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/index.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index a9f648e2ed2..e334249c7c8 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -2,16 +2,16 @@ "initial-version": "0.1.0", "packages": { "packages/google-api-apikeys": {}, - "packages/google-cloud-baremetalsolution": {}, + "packages/google-api-servicecontrol": {}, "packages/google-api-servicemanagement": {}, - "packages/google-cloud-apigateway": {}, "packages/google-api-serviceusage": {}, - "packages/google-api-servicecontrol": {}, "packages/google-appengine": {}, "packages/google-cloud-accessapproval": {}, + "packages/google-cloud-apigateway": {}, "packages/google-cloud-apigeeconnect": {}, "packages/google-cloud-asset": {}, "packages/google-cloud-assuredworkloads": {}, + "packages/google-cloud-baremetalsolution": {}, "packages/google-cloud-batch": {}, "packages/google-cloud-beyondcorp-appconnections": {}, "packages/google-cloud-beyondcorp-appconnectors": {}, @@ -24,49 +24,50 @@ "packages/google-cloud-bigquery-datatransfer": {}, "packages/google-cloud-bigquery-reservation": {}, "packages/google-cloud-bigquery-storage": {}, - "packages/google-cloud-binaryauthorization": {}, "packages/google-cloud-billing": {}, "packages/google-cloud-billing-budgets": {}, + "packages/google-cloud-binaryauthorization": {}, "packages/google-cloud-certificatemanager": {}, + "packages/google-cloud-channel": {}, "packages/google-cloud-clouddms": {}, "packages/google-cloud-contactcenterinsights": {}, - "packages/google-cloud-channel": {}, "packages/google-cloud-contentwarehouse": {}, "packages/google-cloud-datafusion": {}, "packages/google-cloud-datalabeling": {}, "packages/google-cloud-dataplex": {}, "packages/google-cloud-dataproc": {}, - "packages/google-cloud-datastream": {}, "packages/google-cloud-dataqna": {}, + "packages/google-cloud-datastream": {}, "packages/google-cloud-deploy": {}, - "packages/google-cloud-dialogflow-cx": {}, "packages/google-cloud-dialogflow": {}, + "packages/google-cloud-dialogflow-cx": {}, "packages/google-cloud-discoveryengine": {}, - "packages/google-cloud-gkebackup": {}, - "packages/google-cloud-eventarc-publishing": {}, + "packages/google-cloud-documentai": {}, + "packages/google-cloud-domains": {}, "packages/google-cloud-essentialcontacts": {}, "packages/google-cloud-eventarc": {}, - "packages/google-cloud-domains": {}, - "packages/google-cloud-gaming": {}, + "packages/google-cloud-eventarc-publishing": {}, "packages/google-cloud-functions": {}, - "packages/google-cloud-documentai": {}, + "packages/google-cloud-gaming": {}, + "packages/google-cloud-gkebackup": {}, "packages/google-cloud-gkeconnect-gateway": {}, "packages/google-cloud-gkehub": {}, "packages/google-cloud-gkemulticloud": {}, - "packages/google-cloud-ids": {}, "packages/google-cloud-iap": {}, + "packages/google-cloud-ids": {}, "packages/google-cloud-iot": {}, "packages/google-cloud-language": {}, - "packages/google-cloud-mediatranslation": {}, "packages/google-cloud-lifesciences": {}, + "packages/google-cloud-mediatranslation": {}, "packages/google-cloud-memcache": {}, "packages/google-cloud-metastore": {}, "packages/google-cloud-monitoring": {}, - "packages/google-cloud-orgpolicy": {}, - "packages/google-cloud-optimization": {}, - "packages/google-cloud-networksecurity": {}, "packages/google-cloud-networkmanagement": {}, + "packages/google-cloud-networksecurity": {}, "packages/google-cloud-notebooks": {}, + "packages/google-cloud-optimization": {}, + "packages/google-cloud-orchestration-airflow-service": {}, + "packages/google-cloud-orgpolicy": {}, "packages/google-cloud-osconfig": {}, "packages/google-cloud-oslogin": {}, "packages/google-cloud-phishingprotection": {}, @@ -76,9 +77,9 @@ "packages/google-cloud-redis": {}, "packages/google-cloud-resourcemanager": {}, "packages/google-cloud-resourcesettings": {}, - "packages/google-cloud-security-privateca": {}, - "packages/google-cloud-secretmanager": {}, "packages/google-cloud-scheduler": {}, + "packages/google-cloud-secretmanager": {}, + "packages/google-cloud-security-privateca": {}, "packages/google-cloud-security-publicca": {}, "packages/google-cloud-servicedirectory": {}, "packages/google-cloud-shell": {}, @@ -89,19 +90,19 @@ "packages/google-cloud-video-livestream": {}, "packages/google-cloud-video-transcoder": {}, "packages/google-cloud-videointelligence": {}, - "packages/google-cloud-vpcaccess": {}, "packages/google-cloud-vmmigration": {}, + "packages/google-cloud-vpcaccess": {}, + "packages/google-cloud-webrisk": {}, "packages/google-cloud-websecurityscanner": {}, "packages/google-cloud-workflows-executions": {}, - "packages/google-cloud-webrisk": {}, "packages/google-container": {}, "packages/google-dataflow": {}, "packages/google-devtools-artifactregistry": {}, - "packages/google-devtools-containeranalysis": {}, "packages/google-devtools-cloudbuild": {}, + "packages/google-devtools-containeranalysis": {}, "packages/google-iam": {}, - "packages/google-identity-accesscontextmanager": {}, "packages/google-iam-credentials": {}, + "packages/google-identity-accesscontextmanager": {}, "packages/google-maps-addressvalidation": {}, "packages/google-maps-routing": {}, "packages/google-monitoring-dashboard": {}, @@ -115,4 +116,4 @@ } ], "release-type": "node" -} \ No newline at end of file +} From 9839915d54e072ae8430aebaf1c89a938fcda216 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 16 Nov 2022 01:57:05 +0000 Subject: [PATCH 47/48] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../README.md | 32 +++---- .../samples/README.md | 96 +++++++++---------- .../src/index.ts | 6 +- release-please-config.json | 3 +- 4 files changed, 67 insertions(+), 70 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/README.md b/packages/google-cloud-orchestration-airflow-service/README.md index 3270ec43b77..4b2db70d863 100644 --- a/packages/google-cloud-orchestration-airflow-service/README.md +++ b/packages/google-cloud-orchestration-airflow-service/README.md @@ -88,22 +88,22 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js,samples/README.md) | -| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js,samples/README.md) | -| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js,samples/README.md) | -| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js,samples/README.md) | -| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js,samples/README.md) | -| Image_versions.list_image_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_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=/workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_versions.js,samples/README.md) | -| Environments.check_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js,samples/README.md) | -| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js,samples/README.md) | -| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js,samples/README.md) | -| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js,samples/README.md) | -| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js,samples/README.md) | -| Environments.restart_web_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js,samples/README.md) | -| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js,samples/README.md) | -| Image_versions.list_image_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_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=/workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_versions.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js,samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js,samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js,samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js,samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js,samples/README.md) | +| Image_versions.list_image_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_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-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js,samples/README.md) | +| Environments.check_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js,samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js,samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js,samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js,samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js,samples/README.md) | +| Environments.restart_web_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js,samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js,samples/README.md) | +| Image_versions.list_image_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_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-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/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-orchestration-airflow-service/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/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-orchestration-airflow-service/samples/test/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-orchestration-airflow-service/samples/README.md b/packages/google-cloud-orchestration-airflow-service/samples/README.md index af14d9dd3a6..0051b2ea5e7 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/README.md +++ b/packages/google-cloud-orchestration-airflow-service/samples/README.md @@ -46,14 +46,14 @@ Before running the samples, make sure you've followed the steps outlined in ### Environments.create_environment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/environments.create_environment.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js` ----- @@ -63,14 +63,14 @@ __Usage:__ ### Environments.delete_environment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/environments.delete_environment.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js` ----- @@ -80,14 +80,14 @@ __Usage:__ ### Environments.get_environment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/environments.get_environment.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js` ----- @@ -97,14 +97,14 @@ __Usage:__ ### Environments.list_environments -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/environments.list_environments.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js` ----- @@ -114,14 +114,14 @@ __Usage:__ ### Environments.update_environment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/environments.update_environment.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js` ----- @@ -131,14 +131,14 @@ __Usage:__ ### Image_versions.list_image_versions -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_versions.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_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=/workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_versions.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/image_versions.list_image_versions.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js` ----- @@ -148,14 +148,14 @@ __Usage:__ ### Environments.check_upgrade -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.check_upgrade.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js` ----- @@ -165,14 +165,14 @@ __Usage:__ ### Environments.create_environment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.create_environment.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js` ----- @@ -182,14 +182,14 @@ __Usage:__ ### Environments.delete_environment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.delete_environment.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js` ----- @@ -199,14 +199,14 @@ __Usage:__ ### Environments.get_environment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.get_environment.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js` ----- @@ -216,14 +216,14 @@ __Usage:__ ### Environments.list_environments -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.list_environments.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js` ----- @@ -233,14 +233,14 @@ __Usage:__ ### Environments.restart_web_server -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.restart_web_server.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js` ----- @@ -250,14 +250,14 @@ __Usage:__ ### Environments.update_environment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/environments.update_environment.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js` ----- @@ -267,14 +267,14 @@ __Usage:__ ### Image_versions.list_image_versions -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_versions.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_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=/workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_versions.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/image_versions.list_image_versions.js` +`node packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js` ----- @@ -284,14 +284,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/quickstart.js` +`node packages/google-cloud-orchestration-airflow-service/samples/quickstart.js` ----- @@ -301,14 +301,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-orchestration-airflow-service/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=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-orchestration-airflow-service/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/test/quickstart.js` +`node packages/google-cloud-orchestration-airflow-service/samples/test/quickstart.js` diff --git a/packages/google-devtools-containeranalysis/src/index.ts b/packages/google-devtools-containeranalysis/src/index.ts index 4ddc0fe6945..e16d185e972 100644 --- a/packages/google-devtools-containeranalysis/src/index.ts +++ b/packages/google-devtools-containeranalysis/src/index.ts @@ -21,10 +21,8 @@ import * as v1beta1 from './v1beta1'; const ContainerAnalysisClient = v1.ContainerAnalysisClient; type ContainerAnalysisClient = v1.ContainerAnalysisClient; -const GrafeasClient = v1beta1.GrafeasV1Beta1Client; -type GrafeasClient = v1beta1.GrafeasV1Beta1Client; -export {v1, v1beta1, ContainerAnalysisClient, GrafeasClient}; -export default {v1, v1beta1, ContainerAnalysisClient, GrafeasClient}; +export {v1, v1beta1, ContainerAnalysisClient}; +export default {v1, v1beta1, ContainerAnalysisClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/release-please-config.json b/release-please-config.json index a0f551e831a..60dd9d1ead1 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -56,7 +56,6 @@ "packages/google-cloud-kms": {}, "packages/google-cloud-ids": {}, "packages/google-cloud-iap": {}, - "packages/google-cloud-ids": {}, "packages/google-cloud-iot": {}, "packages/google-cloud-language": {}, "packages/google-cloud-lifesciences": {}, @@ -118,4 +117,4 @@ } ], "release-type": "node" -} +} \ No newline at end of file From 11abcf5c89dd59613a6faa91665d3d1a743acde7 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 16 Nov 2022 10:46:20 -0800 Subject: [PATCH 48/48] revert containeranalysis to main --- packages/google-devtools-containeranalysis/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-containeranalysis/src/index.ts b/packages/google-devtools-containeranalysis/src/index.ts index e16d185e972..4ddc0fe6945 100644 --- a/packages/google-devtools-containeranalysis/src/index.ts +++ b/packages/google-devtools-containeranalysis/src/index.ts @@ -21,8 +21,10 @@ import * as v1beta1 from './v1beta1'; const ContainerAnalysisClient = v1.ContainerAnalysisClient; type ContainerAnalysisClient = v1.ContainerAnalysisClient; +const GrafeasClient = v1beta1.GrafeasV1Beta1Client; +type GrafeasClient = v1beta1.GrafeasV1Beta1Client; -export {v1, v1beta1, ContainerAnalysisClient}; -export default {v1, v1beta1, ContainerAnalysisClient}; +export {v1, v1beta1, ContainerAnalysisClient, GrafeasClient}; +export default {v1, v1beta1, ContainerAnalysisClient, GrafeasClient}; import * as protos from '../protos/protos'; export {protos};